SQLConfigDataSource() 
Author Message
 SQLConfigDataSource()

When using SQLConfigDataSource() am able to create, repair and
manipulate a new database, but when I try to add it to ODBC I can only
get the first parameter past the Interface unless I write it out by
hand. eg...

SQLConfigDataSource(NULL,ODBC_ADD_DSN,(const
char*)szDriver,"DSN=DB1\0Description=New Data
Base\0DBQ=c:\windows\george.db1\0\0");

The above works... No problem.

CHAR s[]="DSN=DB1\0Description=New Data
Base\0DBQ=c:\windows\george.db1\0\0");

SQLConfigDataSource(NULL,ODBC_ADD_DSN,(const char*)szDriver,(const
char*)s);

works no problem;

char s[300],fn[50],dsn[10],desc[20];
sprintf(fn,"c:\windows\george.fn");
sprintf(dsn,"DB1");
sprintf(desc,"New Data Base");
sprintf(s,"DNS=%s\0Description=%s\0DBQ=%s\0\0",dsn,desc,fn);
SQLConfigDataSource(NULL,ODBC_ADD_DSN,(const char*)szDriver,(const
char*)s);

This only sends the dsn and no database or desc.

Any Ideas

                George Blais



Fri, 09 Jul 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. SQLConfigDataSource

2. Obtaining New DSN after ::SQLConfigDataSource

3. question on SQLConfigDataSource()

4. Use of SQLConfigDataSource

5. SQLConfigDataSource do not work with System datasources

6. SQLConfigDataSource - Help !!!

7. SqlConfigDataSource and Win32s

8. How to to create a MSJet DB with SQLConfigDataSource

9. SQLConfigDataSource attributes

10. Calling SQLConfigDataSource

11. SQLConfigDataSource and password protected ACCESS database

12. SQLConfigDataSource

 

 
Powered by phpBB® Forum Software