ODBC TABLE SET

G

Guest

I am setting up an ODBC connection to an oracle db using linked tables. When
th e list of available tables comes back it is only a subset of the tables I
know are in the db. Any ideas?
 
P

Pieter Wijnen

Yepp, dependant on the version of Access the number of tables returned are
limited (don't remember the figures - but it's 255 for '97 i believe)
I Use a Passthrough query against the database :
SELECT TABLE_NAME FROM USER_TABLES '(or ALL_TABLES)
And save it As User Tables

I Then Use The
DoCmd.TransferDatabase method (or CreateTableDef) in a loop to link all
tables

incomplete code (away from access at the moment)

Dim Db As DAO.Database
Dim Rs AS DAO.Recordset

Set Db = CurrentDb
Set Rs = Db.OpenRecordset("USER_TABLES",DbOpenSnapshot)
While Not Rs.EOF
DoCmd.TransferDatabase aclink,"ODBC;DSN=xxx;uid=yyy;pwd=zzz","ORAUSER." &
Rs.Fields("TABLE_NAME").Value ....
Rs.Movenext
Wend
Rs.Close : Set Rs = Nothing
Set Db = Nothing

HTH

Pieter




fid_ed said:
I am setting up an ODBC connection to an oracle db using linked tables.
When
th e list of available tables comes back it is only a subset of the tables
I
know are in the db. Any ideas?



--
 
P

Pieter Wijnen

Yepp, dependant on the version of Access the number of tables returned are
limited (don't remember the figures - but it's 255 for '97 i believe)
I Use a Passthrough query against the database :
SELECT TABLE_NAME FROM USER_TABLES '(or ALL_TABLES)
And save it As User Tables

I Then Use The
DoCmd.TransferDatabase method (or CreateTableDef) in a loop to link all
tables

incomplete code (away from access at the moment)

Dim Db As DAO.Database
Dim Rs AS DAO.Recordset

Set Db = CurrentDb
Set Rs = Db.OpenRecordset("USER_TABLES",DbOpenSnapshot)
While Not Rs.EOF
DoCmd.TransferDatabase aclink,"ODBC;DSN=xxx;uid=yyy;pwd=zzz","ORAUSER." &
Rs.Fields("TABLE_NAME").Value ....
Rs.Movenext
Wend
Rs.Close : Set Rs = Nothing
Set Db = Nothing

HTH

Pieter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top