Connecting to Access 97 Database using ADO with OLE DB Driver

Connecting to Access 97 Database using ADO with OLE DB Driver

Post by Shelly Rosenfel » Fri, 08 Oct 1999 04:00:00

Quote:> Here is the code that I used to connect to ACCESS97 via ADO and all works
> fine.

> I have this code in a class named CLOGIN

> Public Function ConnectRemote(Optional dbTYPE As DATABASE_TYPES = 0) As
> Boolean
>     If cn.State = adStateOpen Then
>         ConnectRemote = True
>     Else
>         ConnectRemote = False
>     End If
>     Call SaveSetting(App.Title, "Startup", "ConnectionVersion",
>     Call SaveSetting(App.Title, "Startup", "LastConnected", Now)
>     ConnectRemote = True
> ConnectRemote_Exit:
>     Exit Function

Hey dude, I'm just an old fashioned guy with old programming methods.
Can you elaborate on the If/Else setting of ConnectRemote (personally I
find code easier to use with 1 line, i.e.  ConnectRemote = (cn.State =
adStateOpen) )
when you just end the function by assigning True anyway?

Thanx, Sheldon


1. Connecting to Access 97 Database using ADO with OLE DB Driver

I am trying to connect to Access 97 database using ADO with Microsoft
Jet 3.51 OLE DB Provider but I get an error that the "Test Connection
failed because of an error in intializing provider. Can't open a
database created with a previous version of your application.". However
if convert the database into Access 2000 I can open it. Is there some
other OLE DB drivers I need to get for Access 97 files.
Any help will be appreciated.



2. Unable to view data in SQL Server 2K Enterprise Manager

3. Problem writing to Access 97 DB with ADO 1.5 and 2.1 (using ODBC)

4. FP DOS, invoking Windows app

5. ADO Update (using VB) of Memo fields in Access 97 DB

6. Read and write to *.DDF files

7. using JDBC to connect to Access 97 database

8. bcp - newlines in data

9. Error using Powerbuilder connect to Access 97/2000 database

10. Connect to AS4000 with VB6.0 using ADO and OLE DB

11. ADO Query into Access 97 Database using VB6

12. Using OLE DB or ADO to connect Oracle and SQL Server