VB Migration Partner

KNOWLEDGE BASE - Database and data-binding

Previous | Index | Next 

[INFO] DBGrid control isn’t supported

VB Migration Partner supports the DataGrid control but not the DBGrid control. The reason is that the former is based on ADO binding and can be bound to any ADO-compliant data source, whereas the latter uses DAO binding and supports only the VB6 Data control as a valid data source.

For example, if the original VB6 application has a DataGrid control bound to an AdoDc data control, then VB Migration Partner converts the grid control to a VB6DataGrid control (a wrapper on the actual DataGrid ActiveX control) and the data control to a VB6AdoDc custom control defined in the CodeArchitects.VBLibrary. The VB6DataGrid control appears to be bound to the VB6AdoDc control, but in reality the data grid is bound to the ADO Recordset that the VB6AdoDc control opens behind the scenes. This mechanism works because the DataGrid ActiveX control can be bound to any ADO-compliant data source.

This trick can’t be used with the DBGrid control, though, because it can be bound only to the original VB6 Data control. Alas, the control support library neither does nor can include a COM wrapper for the VB6 Data control, because that control is a private class buried inside the VB6 runtime and can’t be extracted by means of the AxImp.exe tool.

To work around to this limitation you must edit the VB6 application to use ADO binding, and then replace the DBGrid and Data controls with the AdoDc control and the DataGrid control. Applying this fix is easy, because the DataGrid has exactly the same methods, properties, and events of the older DBGrid. After this fix, the VB6 application can be converted to VB.NET using the VB Migration Partner.

Previous | Index | Next 

Follow Francesco Balena on VB6 migration’s group on


Read Microsoft Corp’s official case study of a VB6 conversion using VB Migration Partner.

Code Architects and its partners offers remote and onsite migration services.

More details

Subscribe to our free newsletter for useful VB6 migration tips and techniques.


To learn more about your VB6 applications, run VB6 Analyzer on your source code and send us the generated text file. You will receive a detailed report about your VB6 applications and how VB Migration Partner can help you to quickly and effectively migrate it to .NET.

Get free advice

A fully-working, time-limited Trial Edition of VB Migration Partner allows you to test it against your actual code

Get the Trial

The price of VB Migration Partner depends on the size of the VB6 application, the type of license, and other factors

Request a quote

Migrating a VB6 application in 10 easy steps

Comparing VB Migration Partner with Upgrade Wizard

Migration tools: Feature Comparison Table

All whitepapers