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 Chriss Miller 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
Joined
Oct 20, 2003
Messages
136
Location
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
 
Nope, that doesn't work :( any other suggestions guys?

Surely there must be a way of passing the password through... I know MS can do some silly stuff... but surely this would be a rather large oversite?


"Google is god...of the internet" - Me ;)
 
Where are you executing the SQL from? The QBE or other?
 
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