Thursday, March 29, 2012

Error: Data source name not found and No default driver specified

Hello all,
I have an application which was written in VB6. I used
DSNless connection for the odbc connection to access sql 8.0. The
application works fine on one machine and when I try to run the appl.
on another machine I got this error. Any idea why' Here is my
connection string:
DSNName = "Driver={SQL Server};" & _
"Server=dummy;" & _
"Database=sql_data;" & _
"Uid=crystal"
The user id does not require a password.. Thank you.
SherryThis is a question for a VB group, not a SQL server group, but it sounds
like your DSNName is empty. Are you getting this value from an INI file,
the registry, or is it hardcoded in your app? You will most likely find
that this value is missing, wherever you define it.
Put in a message box that shows DSNName just prior to creating the
connection, and confirm that it is actually populated (I don't think it is).
<sunpalozzi@.gmail.com> wrote in message
news:1138811193.427214.282490@.g43g2000cwa.googlegroups.com...
> Hello all,
> I have an application which was written in VB6. I used
> DSNless connection for the odbc connection to access sql 8.0. The
> application works fine on one machine and when I try to run the appl.
> on another machine I got this error. Any idea why' Here is my
> connection string:
> DSNName = "Driver={SQL Server};" & _
> "Server=dummy;" & _
> "Database=sql_data;" & _
> "Uid=crystal"
> The user id does not require a password.. Thank you.
> Sherry
>|||Maybe the other machine doesn't have MDAC installed?
http://www.aspfaq.com/2057
Once you have the most recent version installed, an OLEDB connection string
will be better in most cases:
ConnectionString = _
"Provider=SQLOLEDB.1; " & _
"Data Source=dummy; " & _
"Initial Catalog=sql_data; " & _
"User ID=crystal; " & _
"Password="
<sunpalozzi@.gmail.com> wrote in message
news:1138811193.427214.282490@.g43g2000cwa.googlegroups.com...
> Hello all,
> I have an application which was written in VB6. I used
> DSNless connection for the odbc connection to access sql 8.0. The
> application works fine on one machine and when I try to run the appl.
> on another machine I got this error. Any idea why' Here is my
> connection string:
> DSNName = "Driver={SQL Server};" & _
> "Server=dummy;" & _
> "Database=sql_data;" & _
> "Uid=crystal"
> The user id does not require a password.. Thank you.
> Sherry
>|||thank you for all replies.. I did post in the vb group as well.. The
wire part is the same application is work on one pc but not the
another... I will try to find out if there a MDAC install on the
problem pc.. thanks.
Sherry

No comments:

Post a Comment