Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ODBC creation with SQLConfigDataSource

833130Jan 21 2011 — edited Feb 14 2011
Hi everyone!

I use the function SQLConfigDataSource from the "odbccp32.dll" DLL to automatically create a data source from a Delphi application. I use it to create every kind of datasources (Firebird, SQL Server, Informis, Access, ...) And it works fine.

This Windows function returns "True" is the ODBC creation was successful and "False" if a problem occured.

I now try to create a connexion to an ORACLE database with the driver "Oracle in OraDB11hHome_home1" which is supplied by Oracle.

Here are the parameters I use :


SQLConfigDataSource (0, //Handle
ODBC_ADD_SYS_DSN, //Creation
'Oracle dans OraDB11gHome_home1', // ODBC driver
Pchar('DSN=MonDSN'+#0+
'ServerName=MonServerName'#0+
'UserID=MonUserId'+#0+
'Password=MonPassword'+#0+
'DisableMTS=F'+#0 +
'BatchAutocommitMode=IfAllSuccessful'+#0
+#0));

My problem is that the function returns "False" (Which would mean that a problem occured during the ODBC connexion). However, The ODBC is created and if I test the connexion to the database, it works just fine. Why does the function return "False" when the ODBC works great. Did I forget something in the configuration?.

Thank you for your answer.

NoƩmie
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 14 2011
Added on Jan 21 2011
4 comments
1,275 views