On Feb 1, 7:26=A0am, Tara database Guidliance <meetsati...@[EMAIL PROTECTED]
>
wrote:
> hi i want to execute following satement in .net
>
> TDStrSQL =3D "create volatile table tab1(somename varchar(100)) on
> commit preserve rows;create volatile table tab2(somenames
> varchar(100)) on commit preserve rows;" 'insert into tab1 values
> ('a'); insert into tab2 values ('b'); select * from tab1 union select
> * from tab2;"
>
> TDODBCcn.Open()
> =A0 =A0 =A0 =A0 TDODBCcmdSelect =3D New Odbc.OdbcCommand(TDStrSQL,
TDODBCc=
n)
>
> =A0 =A0 =A0 =A0 TDODBCdtr =3D TDODBCcmdSelect.ExecuteReader
>
> and database is teradata i the error is
>
> ERROR [25000] [NCR][ODBC Teradata Driver][Teradata Database] Only an
> ET or null statement is legal after a DDL Statement.
Looks like a teradata constraint, not a .net error. You need an ET or
a NULL statement;
(What's an ET?? End Transaction?, IOW a commit?) It looks like it
means you cannot have both DDL (CREATE) and DML (INSERT, SELECT) in
the same transaction.
Why are you creating tables from the application?
Tables should be designed and implemented outside applications (with a
few exceptions).
So what is the business problem you are trying to solve???
Ed


|