Microsoft KB Archive/245270

{|
 * width="100%"|

-

The information in this article applies to:


 * Microsoft SQL Server version 7.0
 * Microsoft ODBC Driver for SQL Server, versions 3.6, 3.7
 * Microsoft OLE DB Provider for SQL Server, version 7.0
 * ActiveX Data Objects (ADO), version 2.1 SP2

-

SYMPTOMS
The ADO Resync method does not refresh the recordset if the recordset is based on a view.

CAUSE
The Metadata from a View is not returned, only the metadata on the base tables is returned. Therefore, the CCE(Client Cursor Engine) does not know how to generate the appropriate SQL commands to resync views.

RESOLUTION
Use the Requery method instead.

STATUS
This behavior is by design.

Steps to Reproduce Behavior

 * 1) Start a new Visual Basic Standard EXE project. Form1 is added by default.
 * 2) From the Project menu, click References, and select the Microsoft ActiveX Data Objects.
 * 3) Place two Command buttons on Form1, Command1 and Command2.
 * 4) Paste the following code into the declaration section of Form1, modify the ConnectionString accordingly.
 * 5) Run the Project.
 * 6) Click Create View.
 * 7) Click Update SQL Server.

Result: Results are displayed in the Immediate Window. Notice that After the resync the title is still the same. After the Requery the title Changes.