querydef: using external odbc

M

mg

how to i create a querydef in msaccess(2007) that references an extrnal
database using an odbc??
i have made on-the-fly queries to the odbc successfully in vba code, but i
cant figure out how to include the connectionstring information when i build
a query by hand in the access environment.

help!
and thanks
 
D

david

The generic form of a select query is

select * from [database].


ODBC databases start with 'odbc' like this:

select * from [ODBC;fred].mytable

The rest of the connect string information goes in there after ODBC

Note: Jet will cache the ODBC connection, you may have trouble
if you try to connect to a different ODBC data source.

(david)
 

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