
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