Access OLE (OpenInsight 32-bit)
At 16 MAY 2012 03:06:13AM Gerry Van Niekerk wrote:
I am trying to read the data from several tables in an access database
So far I can connect and even count the number of records but then I get lost!!
oXl = OleCreateInstance('Access.Application')
filename = 'C:\Data\VP.mdb'
Application = OleCreateInstance("Access.Application")
Application→AutomationSecurity = 1
oSheet = Application→OpenCurrentDatabase(filename)
cdb = Application→CurrentDb()
tdefs = cdb→TableDefs
tcount = tdefs→Count
For i = 1 To tcount
tdef = OleGetProperty(tdefs,'ITEM',i - 1)TableName = tdef->NameNext i
get fields in database flds = tdef→Fields get number of records in database
Rcnt = tdef→RecordCount
* now how do I get the details of the database line by line?
Any help will be greatly appreciated…
Thanks,
Gerry van Niekerk