VB中调用存储过程的问题
这段代码显示的 rs.RecordCount为-1,其实我里面是有一条记录的,请问问题出在哪能里?Dim cnn As New ADODB.Connection
Dim lcmd As New
Dim Param1 As New ADODB.Parameter
Dim rs As New ADODB.Recordset
cnn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=AIS20070910122938;Data Source=WAPSERVER"
cnn.Open
lcmd.ActiveConnection = cnn
= "manusalary"
= adCmdStoredProc
Set Param1 = lcmd.CreateParameter("@date1", adDate, adParamInput)
Param1.Value = "2008-04-23"
lcmd.Parameters.Append Param1
Set rs = lcmd.Execute
Debug.Print rs.RecordCount
cnn.Close