11-13-2009, 01:30 AM
(This post was last modified: 11-13-2009, 01:34 AM by jsknight1969.)
Code:
Set objConnection = CreateObject("ADODB.Connection")
With objConnection
.ConnectionString = "Driver={Microsoft Access Driver (*.mdb)};DBQ="&Trim(DbPath)&";Uid=;Pwd=;")
.CommandTimeout = 60 'default is 30 secs
.Open
End With
This might not be the right connection string, but you need to use the ADODB.Connection and ADODB.Recordset objects to connect and read data from the DB. You should be able to find plenty of examples on Google.
Oh, wait. I missunderstood the question.
You want to use the AccessDB instead of the Datatable? You can use the DB values in your script, but it will not duplicate the capabilities of the DataTable without you writing the code to do so. The datatable has some built in options like run all rows or single iteration. You can do that by using a DB recordset and a while/loop.
Sorry for misunderstanding.