Problem adding ODBC DSNs with SQLConfigDataSource() 
Author Message
 Problem adding ODBC DSNs with SQLConfigDataSource()

The following program compiles in VC++ 5.0 with no errors or warnings.  It
creates a System DSN entry in the registry, yet the "Database" field is an
empty string.  All the other fields are entered properly.

<some preprocessor #defines>
#include <windef.h>
#include <odbcinst.h>

int main(int argc, char * argv[])
  {
  BOOL result = SQLConfigDataSource(NULL,
                                    ODBC_ADD_SYS_DSN,
                                    "INTERSOLV InterBase ODBC Driver
(*.gdb)",
                                    "DSN=sample\0"
                                    "DBQ=C:\\output.gdb\0"
                                    "DESCRIPTION=sample\0"
                                    "LockTimeOut=-1\0"
                                    "ApplicationUsingThreads=1\0"
                                    "\0");
  return (int) result;
  }

Thanks for any assistance.

Jorge



Tue, 18 Dec 2001 03:00:00 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. SQLConfigDataSource using Oracle ODBC Driver problem

2. ODBC SQLConfigDataSource problem

3. Disable Adding DSNs

4. ODBC - problem adding new odbc drivers

5. ODBC System DSNs not visible on workstation

6. Creating ODBC DSNs using VB

7. Moving ODBC DSNs

8. Dynamically creating SQL Server 7 ODBC System DSNs

9. network installation of ODBC Drivers and DSNs

10. Automatic creation of ODBC DSNs...?

11. ODBC DSNs

12. How do I find ODBC version ad DSNs using C++


 
Powered by phpBB® Forum Software