Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cmd Object Not Pulling Records...

Status
Not open for further replies.

flaniganmj

Technical User
Jun 25, 2002
81
US
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.

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top