Data source name not found and no default driver specified

Hi All,

we are upgrading our environment from windows 2000 to windows 2003 and from SQL 2000 Sp3A to SP4. We have an asp application using SQL 2000 ,commerce server 2002 and biztalk server.

As part of the upgrade i'm trying to run a batch file(contains critical daily job) from machine running commerce server 2002 to access a DB on another server(SQL Server) which is windows 2003 standard SQL 2K Sp4. i modified the required config settings. I'm using dsn-less connection string. I get the below error

Run time error ‘-2147467259(80004005)’:

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

The connection string in the commerce server manager is

Provider=MSDASQL.1;Persist Security Info=True;Extended Properties="Driver={SQL Server};SERVER=<Servername\instancename>;DATABASE=<db name>;UID=<user name>;PWD=<password>'

I tried below options with no success.
1. persistsecurityinfo set to false
2. tried running as different user
3. checked the MDAC versions(2003 ones running MDAC 2.8 and commerce server machines(windows 2000) 2.71)
4. Double checked all the config settings.

The same setting works fine in our QA environment. This is the dev environment and i cant get this one working.

Any help is highly appreciated.
Thanks for your time.
Who is Participating?
Chris MConnect With a Mentor Consulting - Technology ServicesCommented:
Alright then. The standard security connection string should look like this:
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

So if you're using Microsoft OLE DB Provider for SQL Server in an ASP application, your connection should be as follows:

Provider=sqloledb;Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

If you have any issue with connection strings, here you go:

Guy Hengel [angelIII / a3]Billing EngineerCommented:
why not:

Provider=SqlOleDb;Persist Security Info=True;SERVER=<Servername\instancename>;DATABASE=<db name>;UID=<user name>;PWD=<password>;

Open in new window

Chris MConsulting - Technology ServicesCommented:
From this message:
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

You can see that your application is still trying to accessing the database at one point though a data source (DSN) which I think you lost while upgrading.

Since you know the database, create a new DSN using the Data Sources ODBC configurator (odbcad32.exe) which has the same name as the DSN which was there.

Your application should be able to pick up this new DSN and connect to the database.

Good day.
JyozealAuthor Commented:
Thanks for replying.
AngelII, I can try that and see but the same settings work in QA environment. That is what puzzling me. Anyhow i will try and come back.
pastorchris, we did not use the DSN even in pre-upgrade environment.  I was assuming that MSDASQL.1 internally uses ODBC drivers.
JyozealAuthor Commented:
I dint use oledb. However changed the connection string format  as described in the given web site. Initially somehow the connection string format was modified by the commerce server manager which did not work in this case. I modified it to represent as given in website that made it work. thank you so much for the help.
All Courses

From novice to tech pro — start learning today.