By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,856 Members | 1,845 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,856 IT Pros & Developers. It's quick & easy.

How to have multiple statements in one query using iDB2Command in .Net

P: 1
Hi

I need to have a single query and which can have multiple statements

For eg:
string str = string.Empty;
str = "select * from Customers;Select * from Orders";

iDB2Connection iDB2con = new iDB2Connection(connStr);
iDB2Command iDBCmd = iDB2con.CreateCommand();
iDBCmd.CommandText = str;
iDBCmd.ExecuteNonQuery();

I get the Error:

SQL0104 Token ; was not valid. Valid tokens: <END-OF-STATEMENT>.


Can any one please let me know how to have multiple statements in one query.

Thanks In Advance.
Jul 23 '09 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.