IISAPI & ODBC please help 
Author Message
 IISAPI & ODBC please help

Hi.

I'm pulling my hair out at this point...  if someone could shed some light I
sure would appreciate it.

I have an ISAPI within I am trying to use odbc.  no matter what I seem to do
I keep getting the same error:

"Data source name not found and no default driver specified",  when trying
to open the database, I have verified that there is a system DSN on the
machine..  here is the code sniplet..

CString strText;
 CDatabase* pdb = new CDatabase();
 try {
  pdb->OpenEx( "ODBC;DSN=Customers;UID=sa;PWD=",
CDatabase::noOdbcDialog|CDatabase::useCursorLib );
 }
 catch( CDBException* e )
 {
  strText.Format( "<br>\n%s<br>", e->m_strError );
  *pCtxt << _T( strText );
  delete e;
 }

//  e->m_strError  always ="Data source name not found and no default driver
specified".

thanks in advance, Rob..



Mon, 03 Mar 2003 03:00:00 GMT  
 IISAPI & ODBC please help

Rob,

remove "ODBC; " prefix from your connection string and try again.

cheers.
jay.

Quote:

> Hi.

> I'm pulling my hair out at this point...  if someone could shed some light
I
> sure would appreciate it.

> I have an ISAPI within I am trying to use odbc.  no matter what I seem to
do
> I keep getting the same error:

> "Data source name not found and no default driver specified",  when trying
> to open the database, I have verified that there is a system DSN on the
> machine..  here is the code sniplet..

> CString strText;
>  CDatabase* pdb = new CDatabase();
>  try {
>   pdb->OpenEx( "ODBC;DSN=Customers;UID=sa;PWD=",
> CDatabase::noOdbcDialog|CDatabase::useCursorLib );
>  }
>  catch( CDBException* e )
>  {
>   strText.Format( "<br>\n%s<br>", e->m_strError );
>   *pCtxt << _T( strText );
>   delete e;
>  }

> //  e->m_strError  always ="Data source name not found and no default
driver
> specified".

> thanks in advance, Rob..



Tue, 04 Mar 2003 03:00:00 GMT  
 IISAPI & ODBC please help
We assume you have an ODBC DSN setup named Customers?
Quote:

>Hi.

>I'm pulling my hair out at this point...  if someone could shed some light I
>sure would appreciate it.

>I have an ISAPI within I am trying to use odbc.  no matter what I seem to do
>I keep getting the same error:

>"Data source name not found and no default driver specified",  when trying
>to open the database, I have verified that there is a system DSN on the
>machine..  here is the code sniplet..

>CString strText;
> CDatabase* pdb = new CDatabase();
> try {
>  pdb->OpenEx( "ODBC;DSN=Customers;UID=sa;PWD=",
>CDatabase::noOdbcDialog|CDatabase::useCursorLib );
> }
> catch( CDBException* e )
> {
>  strText.Format( "<br>\n%s<br>", e->m_strError );
>  *pCtxt << _T( strText );
>  delete e;
> }

>//  e->m_strError  always ="Data source name not found and no default driver
>specified".

>thanks in advance, Rob..



Tue, 04 Mar 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. IISAPI & ODBC please help

2. ODBC & MFC Problem - Please Help

3. Please help!!!!Please help!!!!Please help!!!!Please help!!!!Please help!!!!Please help!!!!Please help!!!!

4. Please help!!!!Please help!!!!Please help!!!!

5. Data Source: Programmatically Configuring an ODBC Data Source - HELP PLEASE

6. ODBC Text driver, wrong column type - help please!

7. ODBC 3.0 and Excel/Text Files HELP ME PLEASE

8. ODBC Parameters in C++, Please Help!

9. Please help me: Using Application Wizard to create a ODBC database program

10. Need Help, Please - CRecordView (ODBC) and Pop-up Dialog

11. Please help with simple ODBC error

12. Problem with VC4.0 and ODBC - Please Help!

 

 
Powered by phpBB® Forum Software