logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

RE: SQL_CALC_FOUND_ROWS using ODBC driver: msg#00030

db.mysql.odbc

Subject: RE: SQL_CALC_FOUND_ROWS using ODBC driver

Why not just

SELECT COUNT(*) FROM MyTableName;

and the result will be in rs.Fields(0).Value?

John Bonnett

-----Original Message-----
From: Nuno Oliveira [mailto:dreasi0n.mysql.com@xxxxxxxxx]
Sent: Thursday, 15 February 2007 11:34 AM
To: myodbc@xxxxxxxxxxxxxxx; mysql@xxxxxxxxxxxxxxx
Subject: SQL_CALC_FOUND_ROWS using ODBC driver

Hi,

I've used PHP with MySQL and I was able to count the rows of a table by
using the following code:

SELECT SQL_CALC_FOUND_ROWS * FROM MyTableName; SELECT FOUND_ROWS();

However, I would like to do the same thing using Visual Basic 6...

When I set the RS.Source to the first SELECT statement and open it, it
run OK but I need to close the RS and open it again using the second
SELECT statement.

After any of this operations I get a Recordset->RecordsCount = 1

How can I work this out?

Thanks


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@xxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo