Click here to Skip to main content
15,868,164 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hai,

I have one text file. This is the sql server script file. If i copy and paste in sql server and if i run it it will work fine. This script has "GO" statement.

The same file (i am getting as string) I am executing from query using SqlCommand cmd=new SqlCommand (string, sqlconnection). This is giving error. The error is "Syntax error near GO". So suppose if i removed GO it will work fine. So please guide me how to execute the text file in sql server through query without delete "GO" statement.

Advance Thanks.
Posted

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900