I want to run my .sql script file using my ASP.NET website through ADO.NET. How it could be it is not working?
When I try
'dbScript is a string and contains contents of the .sql file'
Dim cmd As New SqlCommand(dbScript, con)
Try
con.Open()
cmd.ExecuteNonQuery()
Catch ex As Exception
Finally
con.Close()
cmd.Dispose()
End Try
I get exceptions when GO statement executed in script. How can I fix this problem?