Requery Method Not Available on PassThrough QueriesLast reviewed: April 5, 1996Article ID: Q129925 |
The information in this article applies to:
SUMMARYVisual Basic version 4.0 adds the Requery method for the RecordSet object. This method updates the data in a Recordset object by re-executing the query on which the object is based. When you use Requery, all changes made to the data in the underlying table by other users are displayed in the Recordset, and the first record in the Recordset becomes the current record. This method is not available for RecordSets created using the OpenRecordset method with the dbSQLPassthrough option.
CAUSEThe Requery method requires that column IDs are maintained and that column datatypes and names are the same. For passthrough queries Visual Basic passes the query through to the ODBC database without parsing it and has no way of knowing that these values will be maintained, so it disallows requery. The same is true for Crosstab queries without fixed column lists.
STATUSThis behavior is by design.
MORE INFORMATIONYou can test whether or not your RecordSet can be Requeried by checking the Restartable property of your RecordSet. The Restartable property returns a value that indicates whether a Recordset object supports the Requery method.
Steps to Reproduce Behavior in Visual Basic Version 4.0You will need an ODBC datasource to query against. This example assumes a DSN called "Pubs" exists with table named "Authors".
|
Additional reference words: 4.00 vb4win vb4all
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |