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!

Password broke the query! 1

Status
Not open for further replies.

billybobk

Programmer
Oct 14, 2002
130
US
Some of you might recall this query from a previous thread of mine:
-----------------------------------
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\common\;" & _
"Extended Properties=dBASE IV;" & _
"User ID=Admin;Password="

strSQL = "SELECT Username, name FROM Users WHERE Username NOT IN (SELECT GMLoginname FROM myTable IN 'c:\myPath\Lat.mdb')"

etc....
-----------------------------------
Well we added a password to the Lat.mdb. That broke it. The connectionstring is for the 'users.dbf' table, but how do I set a password for the other, mdb table? There was no connectionstring for it, the IN took care of that! Now with the password protection, that cool query won't work! Any clues? As usual, thanks in advance!

--Bill
One may not reach the dawn save by the path of the night
--Kahlil Gibran
 
>The query doesn't work without them
Yes, this is part of the syntax and they need to be there...
If you didn't have a password, you could also just use:

SELECT GMLoginname FROM Pegboard " & _
"IN '" & App.Path & "\Lat.mdb' "

note where the single quotes are...

You should get into the habit to always use the brackets around the field/table names - it'll avoid problems later.
 
Once again -- thank you!

--Bill
One may not reach the dawn save by the path of the night
--Kahlil Gibran
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top