Microsoft KB Archive/316159

= FIX: Data is not loaded in the DataGrid control if you use the RetrieveFields option in Visual Basic 6.0 =

Article ID: 316159

Article Last Modified on 2/3/2006

-

APPLIES TO


 * Microsoft .NET Framework 1.1 Service Pack 1
 * Microsoft Visual Basic .NET 2002 Standard Edition

-



This article was previously published under Q316159



SYMPTOMS
If you upgrade a Microsoft Visual Basic 6.0 project to Microsoft Visual Basic .NET, and the project contains a DataGrid control that was populated by using the RetrieveFields option, the data does not appear in the grid.



RESOLUTION
Use one of the following methods to resolve this problem:
 * Delete and re-add the DataGrid control after you upgrade the Visual Basic 6.0 project to Visual Basic .NET.

-or-
 * Right-click the DataGrid, click ActiveX, and then click Retrieve Fields in Visual Basic .NET.



STATUS
This bug was corrected in ADO.NET and Visual Basic .NET (2003).



Steps to Reproduce the Problem

 * 1) Create a new Standard EXE project in Visual Basic 6.0.
 * 2) On the Project menu, click Components, and then select Microsoft ADO Data Control 6.0 and Microsoft DataGrid Control 6.0 to add these items to the toolbox.
 * 3) In the connection string property of the ADO Data control, click Build to build a connection string that points to the Biblio.mdb database that ships with Visual Basic 6.0.
 * 4) Set the RecordSource property for the ADO Data control to the Authors table.
 * 5) Set the DataSource property of the DataGrid control to ADODC1.
 * 6) Right-click DataGrid1, and then click Retrieve Fields.
 * 7) Save your project.
 * 8) Open the project in Microsoft Visual Studio .NET.
 * 9) After the conversion completes, run the project.

Notice that the grid is empty.

Keywords: kbfix kbwindowsforms kbdatabinding kbmigrate kbpending kbvs2005swept kbvs2005doesnotapply KB316159

-

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

© Microsoft Corporation. All rights reserved.