Referencing a table within a database

J

jxbeeman

What I’m trying to do is reference a specific table in access using another
program.
The thing is that I know how to get down to the specific file --> like this
/foldername/accessdatabase/….., but how do I reference a specific table in
that file say I wanted a table called addresses. Would I reference it this
way

/flodername/accessdatabase/addresses

or maybe

/flodername/accessdatabase:addresses ???

Thanks, Josh
 
D

Douglas J. Steele

Exactly what are you trying to do, and what's the other program?

Typically, the way you connect to Access from other programs is through ODBC
or OleDb. You define a DSN or connection string that points to the database,
and then your SQL statement refers to specific tables in the the database
pointed to.

Other alternatives are to use Automation (in which case you instantiate an
instance of Access in the other program, use the OpenCurrentDatabase method
to refer to the specific database), DAO (in which case you use the
OpenDatabase method to refer to the specific database, then work with the
DAO objects such as TableDef to refer to the table) or ADOX (in which case
you set a Connection object pointing to the specific database then work with
ADOX objects such as Table)
 
Top