Easysoft
ODBC Drivers for Oracle, SQL Server, Firebird, ISAM, InterBase, Sybase, MS Access & more.

Easysoft Data Access

Why does SQLRowCount/odbc_num_rows and $sth->rows return -1?

Article : 00939
Last Reviewed : 8th January 2007
Revision : 1

odbc_num_rows is the PHP wrapper for the ODBC API SQLRowCount. $sth->rows is the Perl DBI method of obtaining the results from the ODBC API SQLRowCount.

Most ODBC drivers only return a meaningful number from SQLRowCount when you execute row changing SQL e.g. updates, deletes, inserts. For selects most ODBC drivers return -1.

Applies To

Knowledge Base Feedback

* Did this content help you?
Yes
No
Maybe
 
* Please select one option based on your first choice:
I'm very satisfied
I think it will help, but I haven't tried it yet
It is helpful, but I need more information
It is helpful, but hard to understand
Seemed relevant in search results, but didn't help me
The information is incorrect
The page contains one or more broken links
 
  Suggest new content or let us know how we can improve this content:

 
  (* Required Fields)   



© 1993 - 2008 Easysoft Limited. All rights reserved.