Data source name not found and no default driver specified 
Author Message
 Data source name not found and no default driver specified

Hi,

I have the following code:

CDatabase objDB;

 objDB.Open(_T( "mydsn" ), FALSE, FALSE, _T( "ODBC;" ));

and I'm getting an error message "Data source name not found and no default
driver specified". In the ODBC applet in the control panel I have file dsn
called "mydsn".  This DSN points to a valid SQL Server DB.

Error Message:
    Data source name not found and no default driver specified
    State:IM002,Native:0,Origin:[Microsoft][ODBC Driver Manager]

Any ideas as to what may be wrong would be greatly appreciated.

Regards,
Nandy



Sat, 15 Mar 2003 03:00:00 GMT  
 Data source name not found and no default driver specified

May be your odbc is skrewed. I would make one more dsn and try to connect
with it or delete it and create again. If it doent work then i would suspect
ODBC and install it again.

Mahesh
www.mindcracker.com
A C++ developer's network


Quote:
> Hi,

> I have the following code:

> CDatabase objDB;

>  objDB.Open(_T( "mydsn" ), FALSE, FALSE, _T( "ODBC;" ));

> and I'm getting an error message "Data source name not found and no
default
> driver specified". In the ODBC applet in the control panel I have file dsn
> called "mydsn".  This DSN points to a valid SQL Server DB.

> Error Message:
>     Data source name not found and no default driver specified
>     State:IM002,Native:0,Origin:[Microsoft][ODBC Driver Manager]

> Any ideas as to what may be wrong would be greatly appreciated.

> Regards,
> Nandy



Sat, 15 Mar 2003 03:00:00 GMT  
 Data source name not found and no default driver specified
File DSNs seem to work differently than user or system DSNs (which are
stored in the registry).  I use them to connect to our database and in
the connection string I have to put "FILEDSN=myfiledsn" to get it to
work.  You might try that out to see whether that works with the Open
method.  If it doesn't then I agree with Mahesh that perhaps the Open
method doesn't support file DSNs.

/Martin

Quote:
-----Original Message-----

Posted At: Tuesday, September 26, 2000 10:58 AM
Posted To: database
Conversation: Data source name not found and no default driver specified
Subject: Data source name not found and no default driver specified

Hi,

I have the following code:

CDatabase objDB;

 objDB.Open(_T( "mydsn" ), FALSE, FALSE, _T( "ODBC;" ));

and I'm getting an error message "Data source name not found and no
default
driver specified". In the ODBC applet in the control panel I have file
dsn
called "mydsn".  This DSN points to a valid SQL Server DB.

Error Message:
    Data source name not found and no default driver specified
    State:IM002,Native:0,Origin:[Microsoft][ODBC Driver Manager]

Any ideas as to what may be wrong would be greatly appreciated.

Regards,
Nandy



Sun, 16 Mar 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Data Source Name Not Found and No Default Driver Specified

2. Data source name not found and no default driver specified

3. no default driver, data source not found

4. ODBC Driver Setup - Not Source Driver Setup

5. Specifying default name for saving file in client browser

6. "Data source not found" message

7. Data Source not found

8. Specifying default caption other than executable file name

9. CDatabase::OpenEx / Data source not found

10. name of library specified in importlib() not apearing as nemaspace prefix in generated header

11. InvokeMember not finding specified members

12. Help: ADO could not find the specified provider (x800a0e7a)

 

 
Powered by phpBB® Forum Software