flaniganmj
Technical User
The stored procedure pulls records; however, the below ado recordset is coming up with a zero record count. I am not sure what I am missing.
No errors are generated and the parameter values are all vaild.
regards,
mjf
Code:
Dim cnn As New ADODB.Connection
Dim adoRec0 As New ADODB.Recordset
Dim cmd As New ADODB.Command
Set cnn = CurrentProject.Connection
With cmd
.ActiveConnection = cnn
.CommandType = adCmdStoredProc
.CommandText = "dbo.sFRT_FreightAudit_dw"
.CommandTimeout = 10000
.Parameters.Append .CreateParameter("@i_dteStr", adDate, adParamInput, , CDate(Me.txtS.Value))
.Parameters.Append .CreateParameter("@i_dteEnd", adDate, adParamInput, , CDate(Me.txtE.Value))
.Parameters.Append .CreateParameter("@i_dteFil", adDate, adParamInput, , CDate(Me.txtFilter.Value))
.Parameters.Append .CreateParameter("@i_intCompID", adVarChar, adParamInput, 8000, "AFD")
.Parameters.Append .CreateParameter("@i_varRptType", adVarChar, adParamInput, 8000, ,"AUD")
.Parameters.Append .CreateParameter("@i_decVarExp", adDouble, adParamInput, ,50#)
End With
adoRec0.Open cmd, , adOpenKeyset, adLockReadOnly
No errors are generated and the parameter values are all vaild.
regards,
mjf