May 10, 2010 at 9:23 am
Hi,
I'm executing following query from C# code.
Set Showplan_xml on\rGo\r--Query--\rGo\rSet Showplan_xml off\rGo
So that it will be executed as
Set Showplan_xml on
Go
--Query--
Go
Set Showplan_xml off
Go
But I'm getting error that
Incorrect Syntax near 'Go'
The SET SHOWPLAN statements must be the only statements in the batch.
If i execute the same query in sql server it is working fine.
May 10, 2010 at 9:32 am
What's in the query? Can you post it?
May 10, 2010 at 9:41 am
Go is not a T-SQL command, it's syntax used in Management Studio to signal the end of a batch. If you're submitting it from a .Net application, you have to submit the batches separately yourself.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy