SELECTing just one value ?

Results 1 to 2 of 2

Thread: SELECTing just one value ?

  1. #1
    Join Date
    Dec 1969

    Default SELECTing just one value ?

    Hi guys, here is how I get the number of rows in a MySQL table:<BR><BR>strSQL="SELECT COUNT(*) FROM my_table"<BR>Set oRS=oConn.Execute(strSQL)<BR>iNumRows=oRS(0)<BR><B R>That seems inefficient, to use a recordset to store just one value, but I don&#039;t know how else to do it. What do you think ? Take care.

  2. #2
    Join Date
    Dec 1969

    Default No alternative

    You must always use a recordset when fetching data with ADO. I shouldn&#039;t worry about efficiency with regard to that.

Posting Permissions

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