I am constantly getting a rs.count -1 even though I set the cursor type. I am counting the records from a temporary table.Could this be the cause of my error.
>even though I set the cursor type.<BR><BR>Set the cursor type to what? You want to make sure it's static as in adOpenStatic or 3<BR><BR>Regards,<BR>Rob
The rs.cursortype = adOpenstatic. I am still getting -1. Any suggestions will be appreciated
I just had to fix this... could you show the code, please? Also, what OS you using?
OS NT IIS4 ASP 2.0<BR>elseif w_report= "Product Order Summary" then<BR> begin_date= request.form("begin_date")<BR> e_date = request.form("end_date")<BR> <BR> Set objCon = Server.CreateObject("ADODB.Connection")<BR> objCon.Open "FileDSN=MBM_Multio_Live"<BR> ssql = "sp_productordersummary'" & begin_date & "','" & e_date & "'"<BR> Set objRS = Server.CreateObject("ADODB.Recordset")<BR> objRS.ActiveConnection = objCon<BR> objRS.CursorType = adOpenStatic<BR> objRS.Open ssql <BR> response.write objRS.recordcount<BR> objRS.close<BR> Set objRS = nothing<BR> objCon.close<BR> Set objCon=nothing
objCon.CursorType = adOpenStatic<BR><BR>instead of objRS
New response:<BR>Object doesn't support named arguments: 'CursorType' <BR>I thought objCon. does not support cursor type sinces it a prop of RS
Did you include adovbs.inc?
objCon.CursorLocation = adOpenStatic
ADOVBS is included. Any other ideas