KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I need to execute a large set of SQL statements (creating a bunch of tables, views and stored procedures) from within a C# program. These statements need to be separated by GO statements, but SqlCommand.ExecuteNonQuery() does not like GO statements. My solution was to split the SQL string on GO lines, and execute each batch separately. This works as a hack, but can be broken by multiline comments, for example. What is the correct way to do this?
Tags (comma-separated)
Save Edits
Cancel