我有一个存储过程,采用参数,但不返回任何东西。 我该如何把它从MS Access中?
编辑 - 随着Remou的帮助下,我找到了工作:
Set cnn = New adodb.Connection
cnn.ConnectionString =
"driver=SQL Server;server=SERVER\SERVER;database=a_db;Trusted_Connection=Yes"
cnn.Open cnn.ConnectionString
Set cmd = New adodb.Command
cmd.ActiveConnection = cnn
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "stprMoveDataSet"
Set param = cmd.CreateParameter
("DataSetID", adInteger, adParamInput, 6, stDataSet)
cmd.Parameters.Append param
Set param = cmd.CreateParameter
("Destination", adChar, adParamInput, 2, stDestination)
cmd.Parameters.Append param
rs.CursorType = adOpenStatic
rs.CursorLocation = adUseClient
rs.LockType = adLockOptimistic
rs.Open cmd