Results 1 to 15 of 15

Thread: [RESOLVED] Provider cannot be found

  1. #1

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Resolved [RESOLVED] Provider cannot be found

    i added a password to my DB
    i am trying to connect with vb
    i get error provider cannot be found
    why?
    this is my code
    Code:
      Set CN = New ADODB.Connection
        CN.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0" & "Data Source=" & App.Path & "\HairDesign.mdb" & "Password=035924794"
        CN.Open

  2. #2
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,451

    Re: Provider cannot be found

    Print your connection string to the Debug window, and you'll see that your provider looks like this:

    Code:
    Microsoft.Jet.OLEDB.4.0Data Source=<YouAppPath>Password=035924794
    There is no separation between your key/value pairs, so the connection string can't be parsed properly. You need a semicolon between your provider name and your Data Source key, and between your DB path and your password. E.g.

    Code:
    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\HairDesign.mdb;Password=035924794"

  3. #3

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: Provider cannot be found

    i get this error
    Name:  Untitled.jpg
Views: 3453
Size:  11.7 KB

  4. #4
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Provider cannot be found

    Do you have the DB open in Access?

  5. #5

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: Provider cannot be found

    no sir

  6. #6
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,451

    Re: Provider cannot be found

    Double post...forum going bonkers.
    Last edited by jpbro; May 3rd, 2014 at 01:07 PM.

  7. #7
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,451

    Re: Provider cannot be found

    Last edited by jpbro; May 3rd, 2014 at 01:06 PM.

  8. #8

    Re: Provider cannot be found

    For Access with password protection key is "Database Password", not "Password":
    Code:
    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\HairDesign.mdb;Database Password=035924794"

  9. #9

    Re: Provider cannot be found

    ....
    Last edited by goranvuc; May 3rd, 2014 at 01:07 PM. Reason: Double entry

  10. #10

    Re: Provider cannot be found

    Quote Originally Posted by jpbro View Post
    There was a problem with one Kaspersky update about a month ago, i instantly found that Kaspersky is cause, problem was solved in 24 hr by Kaspersky team with next update, so this is not a reason...

  11. #11

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: Provider cannot be found

    no antivirus of that kind jpbro
    For Access with password protection key is "Database Password", not "Password":
    error
    could not find installable isam

  12. #12
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Provider cannot be found

    Can you show us the actual string you are using now?

  13. #13
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Provider cannot be found

    Quote Originally Posted by salsa31 View Post
    error
    could not find installable isam
    You need to change the database type! Which version of Access are you using?

    Edit:

    If you open the database in Access it should say something such as "database name: Database (Access x file format)". x being the version. Note: this might be different to the version of the software you are running. For the connection string mentioned in the first post needs to be Access 2000 format. I forget which provide and provide version needs to be used for the other versions of Access.

    database name = "Whatever your database or table is called".
    Last edited by Nightwalker83; May 3rd, 2014 at 10:53 PM. Reason: Adding more!
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  14. #14
    gibra
    Guest

    Re: Provider cannot be found

    Quote Originally Posted by salsa31 View Post
    i added a password to my DB
    i am trying to connect with vb
    i get error provider cannot be found
    why?
    this is my code
    Code:
      Set CN = New ADODB.Connection
        CN.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0" & "Data Source=" & App.Path & "\HairDesign.mdb" & "Password=035924794"
        CN.Open
    Your connection string is wrong.
    To open a Access database password protected from VB6.0, you must use Jet OLEDB:Database Password parameter:
    Code:
    Dim sql As String
    sql = "Provider=Microsoft.Jet.OLEDB.4.0;" 
    sql = sql & "Data Source=" & App.Path & "\HairDesign.mdb;"
    sql = sql & "Jet OLEDB:Database Password=035924794"
    CN.ConnectionString = sql

  15. #15

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: Provider cannot be found

    tnk you gibra it is working now

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