vb调用存储过程问题
Dim Cmd_Client As New ADODB.Command
Dim Rst_Client As New ADODB.Recordset
Rst_Client.CursorType = adOpenKeyset
Rst_Client.LockType = adLockReadOnly
With Cmd_Client
.ActiveConnection = cn
.CommandType = adCmdStoredProc
.CommandText = "sp_Client_New"
Set param = .CreateParameter("@Cli_fax", adVarChar, adParamInput, 40, Trim(txtfax.Text))
.Parameters.Append param
//Cli_Remoney是Decimal(9,2) 这么怎么写才算正确
Set param = .CreateParameter("@Cli_Remoney", adDecimal, adParamInput, , Format(Val(Trim(txtRemoney.Text)), "0.00"))
.Parameters("@Cli_Remoney").Precision = 9
.Parameters("@Cli_Remoney").NumericScale = 2
.Parameters.Append param
Set Rst_Client = .Execute
End With
MsgBox Rst_Client.RecordCount // 这里怎么写才能得到实际的记录数 而不是-1
Set Cmd_Client = Nothing
Exit Sub
问题点数:20、回复次数:3Top
1 楼faysky2(出来混,迟早是要还嘀)回复于 2006-03-07 15:12:39 得分 20
需要设置客户端游标Top
2 楼hhfh(黑尾砂狐)回复于 2006-03-07 15:25:54 得分 0
Rst_Client.CursorLocation = adUseClient
Rst_Client.CursorType = adOpenKeyset
Rst_Client.LockType = adLockReadOnly
这样设置 不行啊Top
3 楼hhfh(黑尾砂狐)回复于 2006-03-07 16:46:04 得分 0
Set param = .CreateParameter("@Cli_fax", adVarChar, adParamInput, 40, Trim(txtfax.Text))
.Parameters.Append param
//Cli_Remoney是Decimal(9,2) 这么怎么写才算正确
Top




