Results 1 to 7 of 7

Thread: error - no default driver specified

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2004
    Posts
    23

    error - no default driver specified

    The program I wrote is suppose to update a database. It worked just fine on my machine, but when I sent it to my user, they got the following error message when they tried to update the database:

    Get Conn

    Microsoft OLEDB Provider for ODBC drivers: Microsoft ODBC driver manager data source name not found and no default driver specified.

    Runtime error 91: Object variable or block variable not set.

    I looked around on this site and saw that someone last year has something similiar and it was suggested that they needed to have the user install MDAC_typ.exe. I sent that along with the install and when we talked through it on the phone during installation, I think I remember them mentioning it.

    Does anyone have any idea what a good next step would be or any other suggestions? Should I have the user reinstall MDAC_typ? The person with the question last year didn't indicate that this had helped in their situation.

    Any help would be greatly appreciated!!
    Thanks in advance,
    bsac4

  2. #2
    Fanatic Member ahara's Avatar
    Join Date
    Nov 2003
    Location
    Toronto
    Posts
    531
    where is the database - on the users machine?
    "Knowledge is gained when different people look at the same information in different ways"

    - Louis Pasteur

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Feb 2004
    Posts
    23
    Initially, it put the database file in the same folder with everything else. When I was trying to fix the problem, I had the user create the same folders (with exact folder names) as the original path that I had on my computer when I created the program. I had the user put a copy of the database in this folder, but we got the same result.

    bsac4

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974
    Do you use an ODBC data source? (probably set up in Control Panel). If so, it will be needed on the users machine too.


    Have you done a full install, or have you just copied the files to the other computer?

    Oh, and having MDAC_typ.exe installed is essential (but they may have had the same version already).

  5. #5
    Fanatic Member ahara's Avatar
    Join Date
    Nov 2003
    Location
    Toronto
    Posts
    531
    yeah I agree with si_the_geek - that's why I asked about location of DB....when you set up a DSN in the ODBC manager, you must specify a default driver (for Access it is Jet 4.0 for example)....this is probably why the message referred to "no default driver"

    By the way, it is known that using ODBC is not as efficient as calling oledb directly (queries are considerably slower)....ADO can call oledb directly and this is the preferred way to connect to a db in most shops these days.
    "Knowledge is gained when different people look at the same information in different ways"

    - Louis Pasteur

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Feb 2004
    Posts
    23
    Thanks to both of you.

    I did have an install package and MDAC_typ.exe was part of the package.

    You were right. I called the user today and set up the DSN through the ODBC manager. We got further after that, but there is still some problem. I have been milling over the new error message:

    Item cannot be found in collection or group.

    Runtime error 91 object variable or block variable not set.

    I don't suppose anyone would have any idea what might fix this? I feel like I am killing ants at a picnic. There just doesn't seem to be an end.
    Thanks,
    bsac4

    PS. I am new to VB and I don't know how to calling oledb directly, but I will make a note of it and try to figure it out in the near future. Thanks for mentioning it!

  7. #7
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974
    cool, well next time you make an install package, try to make sure that any extra items that are needed (such as ODBC settings) are set up with the program. If possible try installing on another computer before you give it to any users.

    hmm.. those 2 errors seem very similar to the usual problem of a field not existing (or not being called properly).

    Unfortunately there isnt much we can do other than get you to check the database on that machine has all of the data. If it does, what line of code has the error?

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