CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2002
    Posts
    3

    Connection string and password

    Having trouble connecting to my passsword-protected Access 2000 database using OLEDB in VB.net. Here's the pertinent code:

    Dim oOleDbConnection As OleDb.OleDbConnection
    Dim sConnString As String = _
    "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=" & pricebookpath & ";" & _
    "User ID=Admin;" & _
    "Password=FronDBtier"
    oOleDbConnection = New OleDb.OleDbConnection(sConnString)
    oOleDbConnection.Open()

    The Open comand results in the following error:
    "Cannot start your application. The workgroup information file is missing or opened exclusively by another user."

    If I remove the password from the database and remove the password from the connection string, it opens just fine.

    I know the password is correct. Anyone have any thoughts?

    TIA!
    Steve.

  2. #2
    Join Date
    Nov 2004
    Posts
    1

    Re: Connection string and password

    dim conString As String = "provider=Microsoft.Jet.OLEDB.4.0;Data Source=" ....dbname.mdb;Jet OLEDBatabase Password=yourdbpassword"

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