VB6, SQL 2005
I'm trying to use the below code to populate a form once I double click a data grid. "ID" is a key in sql 2005. getting the following error.
Run time error: -2147467259
The precision is invalid
Below is the form code.
Dim cmd As ADODB.Command
Set rs = New ADODB.Recordset
Set cmd = New ADODB.Command
With cmd
.ActiveConnection = strCn
.CommandType = adCmdStoredProc
.CommandText = "SP_NAME"
.Parameters.Append .CreateParameter("ID", adNumeric, adParamInputOutput, 8)
.Parameters("ID").Value = (form.dg.Columns(0))
End With
With rs
rs.CursorType = adOpenDynamic
rs.CursorLocation = adUseClient
rs.LockType = adLockPessimistic
rs.Open cmd
End With
any help would be appreciated
thanks
I'm trying to use the below code to populate a form once I double click a data grid. "ID" is a key in sql 2005. getting the following error.
Run time error: -2147467259
The precision is invalid
Below is the form code.
Dim cmd As ADODB.Command
Set rs = New ADODB.Recordset
Set cmd = New ADODB.Command
With cmd
.ActiveConnection = strCn
.CommandType = adCmdStoredProc
.CommandText = "SP_NAME"
.Parameters.Append .CreateParameter("ID", adNumeric, adParamInputOutput, 8)
.Parameters("ID").Value = (form.dg.Columns(0))
End With
With rs
rs.CursorType = adOpenDynamic
rs.CursorLocation = adUseClient
rs.LockType = adLockPessimistic
rs.Open cmd
End With
any help would be appreciated
thanks