Connecting to Access 97 Database using ADO with OLE DB Driver 
Author Message
 Connecting to Access 97 Database using ADO with OLE DB Driver


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",
cn.Version)
>     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



Mon, 25 Mar 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

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

2. How to use OLE DB/ ADO with Access 97

3. Connect to AS400 using ADO and OLE DB

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

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

6. Sending text to Word 97 from Access 97 using OLE automation

7. ADO Query into Access 97 Database using VB6

8. ADO Query into Access 97 Database using VB6

9. error messages reported by OLE DB /ADO with Access 2000 database at an internet server

10. Connect 16-bit VB app to 32-bit Access 97 DB

11. Help, using an Access 97 DB without MS Access Application

12. Help, using an Access 97 DB without MS Access Application

 

 
Powered by phpBB® Forum Software