Passing DB path as IN SQL clause

C

cherman

I have a query and I want to dynamically pass a path to a DB as the IN
clause. Is this possible? If not, does anyone have a work around for this? I
really don't want to use SQL statments in code unless I have to. Thanks!
 
M

Marshall Barton

cherman said:
I have a query and I want to dynamically pass a path to a DB as the IN
clause. Is this possible? If not, does anyone have a work around for this? I
really don't want to use SQL statments in code unless I have to.


Use the code approach. A parameter can only represent a
value.
 
D

Dale Fye

If you mean that you want to query a table that exists in a database other
than the currentdb, and which is not linked to the current database, then
yes, it is possible.

SELECT * FROM yourTable in 'C:\somefolder\somedatabase.mdb'

HTH
Dale
 
Top