Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting from dao to ado

Status
Not open for further replies.

jbrowne

Programmer
Feb 1, 2000
182
IE
Hi,
I'm converting a project from VB3 to VB6. In the VB3 version, I am accessing a Btrieve database using the ISAM driver included in VB3 through the jet engine using dao. VB6 no longer provides an ISAM driver (no 32 bit equivilent) so we have to try to access thru ODBC. The problem with this is that because we are no longer using the jet workspace - dao does not support the "seek" method which is used extensively throughout the project. I have been given advise to convert to ado but I am not very familiar with ado.
Would the conversion mean extensive code changes or does anyone know if there is a better solution ??

Thanks in advance
John B
 
You already can use ADO to manipulate databases using JET. In ADO, there are some Providers that you can use to connect to different databases. One of them is JET provider. Then you will be able to use your BTrieve database using it.

Refer to MSDN for more info. Remember that when you are opening a connection to the database, before using Open method, you should tell the ADO to use JET provider.

Depending on the version of JET installed on your machine (3.5, 3.51, 4) you should use the related command below:

myConn.Provider="Microsoft.Jet.OLEDB.3.50"
myConn.Provider="Microsoft.Jet.OLEDB.3.51"
myConn.Provider="Microsoft.Jet.OLEDB.4.00"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top