I created a stored procedure in SQL Server, then I create the drop/create script and am trying to see if I can run that script from within VB.net. Is that possible? If so how. I have looked for the answer and am unable to find it so I am not sure if it is even possible.
我在SQL Server中创建了一个存储过程,然后创建了drop / create脚本,并试图查看是否可以在VB.net中运行该脚本。那可能吗?如果是这样的话。我已经找到了答案而无法找到它所以我不确定它是否可能。
1 个解决方案
#1
Use SqlConnection and SqlCommand, in the System.Data.SqlClient namespace.
在System.Data.SqlClient命名空间中使用SqlConnection和SqlCommand。
Specifically: SqlCommand.ExecuteNonQuery Method
具体来说:SqlCommand.ExecuteNonQuery方法
#1
Use SqlConnection and SqlCommand, in the System.Data.SqlClient namespace.
在System.Data.SqlClient命名空间中使用SqlConnection和SqlCommand。
Specifically: SqlCommand.ExecuteNonQuery Method
具体来说:SqlCommand.ExecuteNonQuery方法