I have a MDB that consists largely of a number of linked tables to
external data files, which contain various activity data. I then open
this db from my ADP project using OpenDatabase and OpenRecordset,
which I believe are based on DAO (are they?).
I am in the process of attempting to remove all DAO code from the ADP.
I have never used ADODB to open an MDB, however, and I was wondering
if anyone has a few pointers? It's pretty simple code...
'open the file via the linked table in the mdb, and check the date
inside it
Set db = OpenDatabase("L:\Tools\Reconciliation
\Reconciliation.mdb")
Set act = db.OpenRecordset("Activity")
startDate = CDate(act.fields(1))
I'm hoping this can be converted to something using ADOBD and
connection strings. I'm pretty familiar with these, but they seem to
be extremely fragile so any advice to start would be great!
Maury
Dave Patrick - 26 Mar 2008 03:27 GMT
Dim cnn As ADODB.Connection
Set cnn = CurrentProject.Connection
'Do some stuff here
cnn.Close
Set cnn = Nothing

Signature
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
>I have a MDB that consists largely of a number of linked tables to
> external data files, which contain various activity data. I then open
[quoted text clipped - 17 lines]
>
> Maury
Maury Markowitz - 26 Mar 2008 14:31 GMT
On Mar 25, 10:27 pm, "Dave Patrick" <DSPatr...@nospam.gmail.com>
wrote:
> Dim cnn As ADODB.Connection
>
> Set cnn = CurrentProject.Connection
> 'Do some stuff here
> cnn.Close
> Set cnn = Nothing
Ummm, no.
Maury
Dave Patrick - 27 Mar 2008 03:46 GMT
That's very descriptive!

Signature
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
Ummm, no.
Maury