I am trying to write a vb.net process to create stored procedures from vss files.
They all contain multiple 'GO' statements in the script.
Everything is great till it hits the 'go' command. I'm using SQL Server 2000
I can't really strip the go out of all the VSS code. Any thoughts would be greatly appreciated.
--------------------
Code similar to the following:
e.g.
strFileContents = My.Computer.FileSystem.Rea
dAllText("
c:test.sql
")
connection.Open()
sql = strFileContents
'Example: CREATE PROCEDURE dbo.sp_mysp as update table set field = 50 GO
myCommand = New SqlCommand(Sql, connection)
ra = myCommand.ExecuteNonQuery(
) <<< Errors right here unless I take out the "GO"
Start Free Trial