Question What is the problem with my connection string?

newlearner

New member
Local time
Today, 06:08
Joined
Sep 9, 2010
Messages
3
cn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0; " & _
"Data Source=" & App.Path & "\users.accdb" & _
"Jet OLEDB:Database Password=yani;"


that is my connection string. can somebody please tell me what's not right on it? I cant figure it out.

I am a newbie in learning access and I am using 2007 version.
 
Last edited by a moderator:
Why are you trying to use a connection string to an Access database? Is this a SEPARATE database outside of the one you are using this in?
 
yes sir. it is a separate database.
 
What is APP? How have you instantiated it? What does it refer to?

So App.Path might not be giving you what you think.

Also, can you provide the full code for the event or procedure? You might be going about this in a way that could be done easier. But I don't know because I can't see what you are doing.
 
You do not have a delimiter to separate your JET OLEDB:Password argument. To help me not forget that little gem of a character, I will often lead a new line with each argument:

Code:
cn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0" & _
";Data Source=" & App.Path & "\users.accdb" & _
"[COLOR=red];[/COLOR]Jet OLEDB:Database Password=yani"
 
Last edited by a moderator:
>> Last edited by boblarson; Today at 09:46 AM.. Reason: disable smilies <<

LOL! .. I put it in code tags at the same time to attempt to fix! ... thanks Bob!

PS>
Hello! ... and good to 'see' ya!
 

Users who are viewing this thread

Back
Top Bottom