【发布时间】:2010-11-14 12:25:34
【问题描述】:
我想通过 ADO.NET 使用我的 ASP.NET 网站运行我的 .sql 脚本文件。怎么可能不工作?
当我尝试时
'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
在脚本中执行 GO 语句时出现异常。我该如何解决这个问题?
【问题讨论】: