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!

RS.RecordCount = -1 yet records there!!!

Status
Not open for further replies.

metsey

Programmer
Mar 2, 2001
49
US
I am using a adodb.command object to pull a recordset. yet while it pulls up the records it will NOT allow me to get a recordcount (always -1). Is there some property setting in the connection or command I am not seeing????

Partial Code Segment>
cm.CommandType = adCmdStoredProc
cm.CommandText = "usp_ImportErrorLogView"
cm.CommandTimeout = 1500

cm.Parameters.Append cm.CreateParameter("Carrier", adVarWChar, adParamInput, 20)
' set the initial value of the param ="BCBS"'
cm.Parameters("Carrier").Value = Trim(Carrier)
cm.Parameters.Append cm.CreateParameter("Master", adSmallInt, adParamInput)
cm.Parameters("Master").Value = cint(MasterID)
cm.ActiveConnection = cn
Set rs = cm.Execute
rs.MoveFirst

If rs.RecordCount > 0 Then
Response.Write &quot;<p Align=Center>Import Error Log Listing</Align></p>&quot;
Else
Response.Write &quot;<p Align=Center>Import Error Log View Failed</p><BR>&quot;
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top