Microsoft KB Archive/257788

= FIX: Navigating DataGrid Using Row Selector Fails to Submit Updates =

Article ID: 257788

Article Last Modified on 8/7/2007

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q257788



SYMPTOMS
Navigating through a DataGrid control by using the Row Selector fails to submit pending changes to the underlying data source.



RESOLUTION
This behavior no longer occurs with the version of the DataGrid that is included with the latest service pack for Visual Basic 6.0.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in the latest service pack for Visual Studio 6.0.

For additional information about Visual Studio service packs, click the following article numbers to view the articles in the Microsoft Knowledge Base:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That a Visual Studio Service Pack Is Installed

To download the latest Visual Studio service pack, visit the following Microsoft Web site:

http://msdn2.microsoft.com/en-us/vstudio/Aa718353.aspx



MORE INFORMATION
A Row Selector is the rectangle to the left of each row of a DataGrid. When it is clicked, the Row Selector selects an entire row of the DataGrid. You may navigate through the DataGrid by clicking on different Row Selectors in sequence.

Navigating through the DataGrid using Row Selectors fails to submit pending changes to the underlying data source, regardless of the backend database used to populate the grid. The example below demonstrates the behavior against a Jet Database.

Steps to Reproduce Behavior
 In Visual Basic, open a new Standard EXE project. Form1 is added to the project by default. From the Project menu, click to select Components. From the list of available components, select Microsoft ADO Data Control 6.0(OLEDB) and Microsoft DataGrid Control 6.0(OLEDB). Place an ADO Data Control, a DataGrid, and a TextBox control onto Form1. Set the ConnectionString property of the ADO Data Control to connect to the Nwind database that comes with Visual Basic. Connect using the Microsoft Jet 4.0 OLE DB Provider.  The ConnectionString property of the ADO Data Control should look like the following: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Microsoft Visual Studio\VB98\NWIND.MDB;Persist Security Info=False </li> Set the RecordSource property of the ADO Data Control to Select * From Customers.

Set the DataSource property of the DataGrid to ADODC1 (the ADO Data Control).

Set the DataSource property of the TextBox to ADODC1.

Set the DataField property of the TextBox to CompanyName.</li> Run the program.</li> Select the fourth row of data by using the DataGrid's Row Selector.</li> Edit the contents of the field in the TextBox. Without clicking other areas of the grid, navigate to the sixth row of the DataGrid by clicking on the Row Selector button for the sixth row.</li> Edit the contents of the field in the TextBox. Click on the Next button of the ADO Data Control to navigate to the next row.</li> Stop the application.</li> Run the application again to inspect the data, and note that when the ADO Data Control was used to navigate through the DataGrid, the change was submitted.

However, when the Row Selector was used to navigate through the DataGrid, the change was not submitted.</li></ol>

Additional query words: sp4

Keywords: kbbug kbdatabase kbfix kbmdacnosweep kbvs600sp4fix kbvs600sp5fix KB257788

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.