Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Databases General > Re: execution o...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 6 Topic 3091 of 3295
Post > Topic >>

Re: execution of multiple DDL statements from .net

by Ed Prochak <edprochak@[EMAIL PROTECTED] > Feb 1, 2008 at 06:20 AM

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
 




 6 Posts in Topic:
execution of multiple DDL statements from .net
Tara database Guidliance   2008-02-01 04:26:30 
Re: execution of multiple DDL statements from .net
Ed Prochak <edprochak@  2008-02-01 06:20:13 
Re: execution of multiple DDL statements from .net
Tara database Guidliance   2008-02-03 22:44:42 
Re: execution of multiple DDL statements from .net
Ed Prochak <edprochak@  2008-02-04 05:47:15 
Re: execution of multiple DDL statements from .net
Tara database Guidliance   2008-02-05 04:53:50 
Re: execution of multiple DDL statements from .net
Ed Prochak <edprochak@  2008-02-05 10:43:33 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 10:28:00 CST 2008.