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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Querying Password Protected Remote Access DB Using SQL Only

Status
Not open for further replies.

Shippwreck

Programmer
Oct 20, 2003
136
GB
Hi,

I'm trying to query a remote DB with a password using SQL only. Ie no linked tables, no VBA just the SQL. I can do this for a DB without a password but can't seem to do it for one with... here's what I mean:

Code:
SELECT * FROM table1 IN "C:\remote_db.mdb"

That works great when the DB isn't password protected, but if there's a password on the DB it gives me the "Not a valid password" error.

Any ideas on how to incorporate the password into the query?

Cheers


"Google is god...of the internet" - Me ;)
 
perhaps


SELECT * FROM table1 IN "C:\remote_db.mdb /pwd password
 
SELECT * FROM table1 IN 'C:\remote_db.mdb /pwd password'

note the single quotes



MichaelRed


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top