What is the IN CLAUSE for an access database with password?

G

Guest

I'm writing, in Access 2003, a select query in which the source table is in
an external database protected with password, that I can't link to for other
reasons.

My last try was:

SELECT id from table1 in "" [database=dbprotected.mdb; pwd=myword;]

but I get the message 'could not find installable isam' (both the db are
access ones).
 
M

Marshall Barton

Diego said:
I'm writing, in Access 2003, a select query in which the source table is in
an external database protected with password, that I can't link to for other
reasons.

My last try was:

SELECT id from table1 in "" [database=dbprotected.mdb; pwd=myword;]

but I get the message 'could not find installable isam' (both the db are
access ones).


You need a semicolon before Database and the full path to
the file. I think you need to specify a value for UID
without a trailing semicolon.

You can see the exact connect string if you link to the
table and then look at the linked table's Connect property
in the Immediate window:

?CurrentDb.TableDefs!tablename.Connect
 
G

Gary Walter

Diego Cattaruzza said:
I'm writing, in Access 2003, a select query in which the source table is
in
an external database protected with password, that I can't link to for
other
reasons.

My last try was:

SELECT id from table1 in "" [database=dbprotected.mdb; pwd=myword;]

but I get the message 'could not find installable isam' (both the db are
access ones).


In addition to Marshall's sage advice, I think you just forgot
to include the "isam," plus maybe will need full path?

SELECT id from table1
IN '' [MS Access;PWD=myword;DATABASE=C:\dbprotected.mdb]

I just used 2 single quotes in case trying to create
query string in code, but 2 double quotes will work....

good luck,

gary
 

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