回复: 在vs2005中,如果使用SMO调用带参数的存储过程?
找到一个不是很理想的方法,不知道怎样得到输出参数的值:
Dim conn As New ServerConnection("实例", "用户名", "密码")
Dim oDB As Smo.Database
Dim oServer As Smo.Server
'存储过程的输入参数
Dim i as String
conn.Connect()
oServer = New Smo.Server(conn)
oDB = New Smo.Database(oServer, "数据库名")
'这里@p1为输出参数,但不知道在程序里怎么得到这个输出参数
oDB.ExecuteNonQuery("declare @p1 int exec 存储过程名称 " + i +",@p1 output")