Previous | Index | Next 

[PRB] The Data control may fail when accessing a non-Access data source

A program that uses the Data control to work with a database other than Access may file after the migration to VB.NET. The reason for this behavior is that the VB6Data control – and more in general the VB6Library – uses version 3.6 of the DAO type library. This choice is necessary to use the Microsoft Jet 4.0 database engine.

If your original VB6 application was using DAO 3.51, the switch to DAO 3.6 is a smooth one in most cases. However, Microsoft Jet 4.0 drops support for the FoxPro IISAM, which means that applications using the Data control to access FoxPro table won’t work after the migration.

We have found that in many cases you can work around this issue by simply specifying that you are accessing dBASE III files instead of FoxPro tables, therefore if you experience a runtime exception in using the Data control your first attempt should be in changing the value of the Data control’s Connect property:

        Data1.Connect = "dBASE III"

Starting with VB Migration Partner version 1.32, the VB6Data control exposes a new custom property named IgnoreConnect. If you experience a runtime exception when opening a database using this control you should attempt setting this new property to True:

        Data1.IgnoreConnect = True

For more information, please read this Microsoft KB article.

 

Previous | Index | Next