Click here to Skip to main content
15,921,606 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCButton Text Color change Pin
Gerry24-Jul-01 3:53
Gerry24-Jul-01 3:53 
Generala quastion Pin
24-Jul-01 3:45
suss24-Jul-01 3:45 
GeneralRe: a quastion Pin
Tomasz Sowinski24-Jul-01 3:52
Tomasz Sowinski24-Jul-01 3:52 
GeneralMaking A CFont Go Bold Pin
AJ12324-Jul-01 3:26
AJ12324-Jul-01 3:26 
GeneralRe: Making A CFont Go Bold Pin
Tomasz Sowinski24-Jul-01 3:40
Tomasz Sowinski24-Jul-01 3:40 
GeneralRe: Making A CFont Go Bold Pin
AJ12324-Jul-01 6:00
AJ12324-Jul-01 6:00 
GeneralRe: Making A CFont Go Bold Pin
fantastic_mr_fox24-Jul-01 6:26
fantastic_mr_fox24-Jul-01 6:26 
GeneralSQLConfigDataSource() & string problem Pin
Derek Price24-Jul-01 3:11
Derek Price24-Jul-01 3:11 
Hello,

I am having a trouble using the SQLConfigDataSource() method. I can call it successfully with the code below:

CString sDriver;
sDriver.LoadString(IDS_SYBASE_DRIVER);
bSuccess = SQLConfigDataSource(NULL,ODBC_ADD_DSN,sDriver,
    "DSN=123\0"
    "DatabaseName=123\0"
    "DatabaseFile=E:\\junk.db\0"
    );

But when I try to put the connection string into a CString or the string table, the string gets reduced to "DSN=123" due to the required '\0' value separator. I would like to create a format string like "DSN=%s\0DatabaseName=%s\0DatabaseFile=%s\0" so can create a custom ODBC database.

Any ideas on how to do this?

Thanks in advance!
Derek
GeneralRe: SQLConfigDataSource() & string problem Pin
Michael Dunn24-Jul-01 3:22
sitebuilderMichael Dunn24-Jul-01 3:22 
GeneralRe: SQLConfigDataSource() & string problem Pin
Derek Price24-Jul-01 3:35
Derek Price24-Jul-01 3:35 
GeneralRe: SQLConfigDataSource() & string problem Pin
Michael Dunn24-Jul-01 3:42
sitebuilderMichael Dunn24-Jul-01 3:42 
GeneralRe: SQLConfigDataSource() & string problem Pin
Derek Price24-Jul-01 3:46
Derek Price24-Jul-01 3:46 
GeneralRe: SQLConfigDataSource() & string problem Pin
Michael Dunn24-Jul-01 4:02
sitebuilderMichael Dunn24-Jul-01 4:02 
GeneralRe: SQLConfigDataSource() & string problem Pin
Derek Price24-Jul-01 4:35
Derek Price24-Jul-01 4:35 
GeneralRe: SQLConfigDataSource() & string problem Pin
Derek Price24-Jul-01 4:33
Derek Price24-Jul-01 4:33 
GeneralRe: SQLConfigDataSource() & string problem Pin
Mike Burston24-Jul-01 13:04
Mike Burston24-Jul-01 13:04 
GeneralRe: SQLConfigDataSource() & string problem Pin
Derek Price25-Jul-01 6:44
Derek Price25-Jul-01 6:44 
GeneralRe: SQLConfigDataSource() & string problem Pin
Carlos Antollini25-Jul-01 7:02
Carlos Antollini25-Jul-01 7:02 
GeneralRe: SQLConfigDataSource() & string problem Pin
Derek Price25-Jul-01 7:08
Derek Price25-Jul-01 7:08 
GeneralA RichEdit poblem... Pin
24-Jul-01 2:59
suss24-Jul-01 2:59 
GeneralRe: A RichEdit poblem... Pin
Ernest Laurentin24-Jul-01 3:24
Ernest Laurentin24-Jul-01 3:24 
GeneralThanks a lot!... Pin
24-Jul-01 3:42
suss24-Jul-01 3:42 
GeneralGetting Mouse Position Pin
24-Jul-01 2:56
suss24-Jul-01 2:56 
GeneralRe: Getting Mouse Position Pin
Tomasz Sowinski24-Jul-01 3:07
Tomasz Sowinski24-Jul-01 3:07 
GeneralRe: Getting Mouse Position Pin
29-Aug-01 12:44
suss29-Aug-01 12:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.