Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"No Default Driver" Troubles

Status
Not open for further replies.

JohnMalv

Programmer
Jun 21, 2004
16
US
I'm having this (yes, another) problem with MSSQL Server (though I'm uncertain if it's MSSQL specific yet), and I don't know if it's something on the code level or something on a system level. I suspect system level, but it's worth a shot to look into programmatic options as well. I've tried the application on about 7 or 8 systems and it works fine. Someone else tried it on 4, only one of which worked, the other 3 all failed with the same error on SQLConnect. Something to the effect of "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified". It, however, is using the exact same (DSN-less, though I think DSN has been tried as well) connection string as the machines it did work on, and the driver appears to exist on the system (XP and 2k, installs it with the OS.)

Is there anything I'm not thinking of that I should be altering or searching for that could be causing the problems, or is there just an ODBC problem on the failing systems? Is there anything, ODBC-wise, that could affect such a thing? Could it be an erroneous error for something else wrong?

(Note: This is reposted from the C++ forum and modified with further detail)
 
Creating an equivalent DSN through ODBC admin might give you more clues in the process, about at what point it doesnt work. Including trying the "Test connection" button. It would be unusual if using the DSN doesnt work after you get through creating it and it tests OK (except for using a different username, which "no default driver" dosnt sound like).

Perhaps you should post your connect string here (changing any names).

OR perhaps you should be using OLE DB not ODBC:
- "Provider=sqloledb; Data Source=server1; Initial Catalog=pubs; User Id=user1; Password=pw1;"
- "Provider=sqloledb; Data Source=server1; Initial Catalog=pubs; Trusted_Connection=yes;"
 
According to the person who reported the troubles, he tried (successfully) to create a DSN to the same database on the same system, while the DSN-less connection string is experiencing problems. Username is defintely a different error than this one. In fact, the only way I have personally been able to cause the error on my machine is to intenteionally put bad characters in the driver section (DRIVEsR={SQL Server}, DRIVER={SQL Servzer} etc.)

I suppose trying OLE DB could theoretically work, though I'd be hesitant for an ODBC-specific application.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top