The information in this article applies to:
SYMPTOMS
When using rdoResultsets, the RowCount property is useful for determining
how many records have been returned by the query. Depending on the driver
and data source, the RowCount property returns either -1 to indicate that
the number of rows is not available, or 0 to indicate that no rows were
returned by the rdoResultset. If the driver is capable of returning a row
count, the RowCount property returns the number of rows in the
rdoResultset.
WORKAROUND
If a Movelast is executed against the rdResultset before the RowCount is
queried, then the RowCount will be correctly set.
STATUSMicrosoft has confirmed this to be an issue in the Microsoft products listed at the beginning of this article. Microsoft is researching this issue and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATION
The following Visual Basic code opens a connection to the server and
creates an asynchronous rdoResultset. This code uses a "DSN-less" ODBC
connection so you do not need to set up a DSN (Data Source Name) with the
ODBC Admin utility.
Q147875 : How to Use DSN-Less ODBC Connections with RDO and DAO In the following code, MyServer is assumed to be a Microsoft SQL Server with the default database PUBS installed. Steps to Reproduce Problem
REFERENCESVisual Basic Online Help OpenResultset, RowCount Additional query words: 4.00 vb4win vb432
Keywords : kbDatabase kbODBC |
Last Reviewed: June 24, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |