I discovered a few weeks ago that I could run multiple queries in one statement, delimited by a semi-colon...in other words...
MyAdapter = new SqlDataAdapter("select * from table1; select * from table2", MyConnection);
I've also discovered that I *believe* I can use this to 'mimic' a stored proc that needs to run multiple queries and/or return multiple result sets.
Two questions:
1) What is the limit on the string for the 1st parameter to SQLDAtaAdapter?
2) Are there less 'round trips' to SQL Server if I combine multiple SELECT statements and delimit them with a semi-colon? I'm just wondering if that's faster than separate SQLDATAADAPTER calls. If it's not faster and/or the max length of the string isn't that high, then I guess separate calls is better.
I'm not allowed to use stored procs, so I'm trying to come up with decent workarounds
Thanks,
Kevin