CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    Oct 2003
    Location
    Timisoara, Romania
    Posts
    460

    Question Error when trying to connect to pass protected db

    Hi all,
    I'm tring to connect to a password protected microsoft access mdb file and I get an error about the data base being opend exclusevly by another user. The thing is that the db is on my disk and is not opened.
    The connection string is like this:
    Code:
    OleDbConnection aConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" + 
    				"User Id=admin;Password=xxx;Jet OLEDB:Engine Type=5;Persist Security Info=True;" +
    				"Data Source=C:\\Documents and Settings\\Mihai\\Desktop\\Imobiliare\\Vita\\BD\\anunturi.mdb");
    The thing is that if I try to open a mdb file that has no password and I remove the part about User Id and Password from the conn string it works.
    Can someone help me out?
    Thank you!
    Last edited by vma; September 4th, 2006 at 02:32 AM.
    You liked it? Please show your gratitude and rate it!

    There is no 'patch' for stupidity.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured