recordcount probs it giving -1

Results 1 to 2 of 2

Thread: recordcount probs it giving -1

  1. #1
    rahul Guest

    Default recordcount probs it giving -1

    i am trying to count record from table and it is showing me out put with -1<BR>here is my code <BR>&#060;% dim con,rscount<BR>set con = server.createobject ("adodb.connection")<BR> "provider=microsoft.jet.oledb.4.0;data source=\newstarmale.mdb"<BR>set rscount = server.createobject ("adodb.recordset")<BR> "list",con,0,1<BR>%&#062;<BR> &#060;body topmargin="0" leftmargin="0"&#062;<BR> &#060;% response.write "this table contains"%&#062;<BR>&#060;% response.write rscount.recordcount%&#062;<BR>&#060;% response.write "records"%&#062;<BR>please help me urgent it is important<BR><BR>

  2. #2
    ed Guest

    Default RE: recordcount probs it giving -1

    You must be using the wrong type of cursor. See<BR><BR><BR>and<BR><BR><BR>Also,<BR><BR>I normally count records using SQL rather than the recordSet property &#039recordCount&#039<BR>Set rsCount = conn.Execute("SELECT Count(*) FROM pubs")<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