Results 1 to 3 of 3

Thread: Recordcount

  1. #1
    Join Date
    Dec 1969

    Default Recordcount

    I have an Access 2000 db that I have built queries in. I am using the ADO command object to build my parameters like so: <BR><BR>Set objCommand = Server.CreateObject("ADODB.Command") <BR>objCommand.ActiveConnection = conntemp <BR>objCommand.CommandText = "QCATEGORYBYDESC" <BR>objCommand.CommandType = adCmdStoredProc <BR><BR>set objParameter = objCommand.CreateParameter("Description",adChar,ad ParamInput, 255, strDescription) <BR>objCommand.Parameters.Append objParameter <BR><BR>Set RecordSet = objCommand.Execute <BR><BR>RecordSet.recordcount returns a -1 but guess what..... <BR><BR>it will loop through the recordset with this logic: <BR><BR>Do While NOT RecordSet.EOF <BR>... <BR>Loop <BR><BR>What is the deal???? <BR>Thanks for your help.

  2. #2
    Forum Police Guest

    Default * Crosspost ansered in Q&A *


  3. #3
    Web Developer Guest

    Default RE: Recordcount

    Hi,<BR>Add the following lines before Set RecordSet = objCommand.Execute <BR>set Recordset=server.createobject("Adodb.recordset")<B R>Recordset.cursortype=1<BR><BR>Then your problem will be solved.<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts