Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query: SELECT * FROM Tabla1 IN 'c:\datab.mdb';

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
I'm trying to access a table into a external database with the IN command.
The query is as follows: SELECT * FROM Tabla1 IN 'c:\datab.mdb';
It works right if the .mdb file got no password, but if it has a password... how would it be the right syntax in the IN command?

Thanx!
 
Need more info
What programming language are you using to execute this
sql.
 
Hi Danny,
assuming that this, being an .MDB file is an Access database, then I think that you need to add /pwd password. In other words if your database password was the word 'CHRISTMAS' you would need to:
SELECT * FROM Tabla1 IN 'c:\datab.mdb /pwd CHRISTMAS'

Hope this works/helps
Marc
 
Can this sql be used to join a oracle table with
a Access database table? If so what is the syntax?
 
jwb3d,
not sure of that, it depends upon the whether the envirnoment you are running in allows it. The answer I gave above is just the standard way to access an Access db by specifying the password in the command line.
Marc
 
you can join an access table to an oracle table in access if the oracle table is defined as a "linked" table via odbc

open the database in access, and select

File > Get External Data > Link tables


rudy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top