Create DSN to Oracle ODBC Driver Programatically- HOW? 
Author Message
 Create DSN to Oracle ODBC Driver Programatically- HOW?

Please, help me !
I need create DSN with Oracle ODBC Driver.

I use the following:

 char *attribP = "DSN=Vasya_Oracle\0 Description=stam\0 UserID=UserTest\0
PWD=PwdTest\0";

::SQLConfigDataSource(NULL,ODBC_ADD_DSN, "Oracle ODBC Driver\0", attribP);

I success cresate DSN, named Vasya_Oracle, but User/Pwd are empty.

What I do wrong?



Sun, 09 May 2004 18:18:06 GMT  
 Create DSN to Oracle ODBC Driver Programatically- HOW?

says...

Quote:
> Please, help me !
> I need create DSN with Oracle ODBC Driver.

> I use the following:

>  char *attribP = "DSN=Vasya_Oracle\0 Description=stam\0 UserID=UserTest\0
> PWD=PwdTest\0";

> ::SQLConfigDataSource(NULL,ODBC_ADD_DSN, "Oracle ODBC Driver\0", attribP);

> I success cresate DSN, named Vasya_Oracle, but User/Pwd are empty.

> What I do wrong?

Hi Alex,

The line should be terminated with a double \0.

"DSN=Vasya_Oracle\0 Description=stam\0 UserID=UserTest\0PWD=PwdTest\0
\0";

HTH.

--

Kind regards,

Wm. G. Urquhart



Sun, 09 May 2004 21:09:57 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to create an ODBC DSN programatically ?

2. Oracle ODBC driver instead of Microsofts ODBC Oracle driver

3. Programatically Creating System DSN's

4. MFC CDatabase, Oracle v2 Driver, ODBC v3 driver manager

5. ORACLE ODBC DSN

6. DSN-Less ODBC using text drivers

7. Creating a file dsn for an Oracle database

8. How Do I add DSN programatically (non-MFC)?

9. Oracle ODBC Drivers

10. Oracle ODBC Drivers that support CRecordset::dynaset

11. New Oracle ODBC driver

12. Oracle ODBC Drivers that support Dynasets?

 

 
Powered by phpBB® Forum Software