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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
Chris MConsulting - 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:


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.