Re: (no subject)

Igor Korot <[email protected]>
Newsgroups gmane.comp.db.unixodbc.devel
Message-ID <29558562.1219382524915.JavaMail.root@mswamui-swiss.atl.sa.earthlink.net>
Nick,
Did you look at this one?
Or maybe I'm expecting too much from this function?
I just want to see the standard dialog - the same as if you tried to create DSN from ODBCConfig...

Thank you.

-----Original Message-----
>From: Igor Korot <[email protected]>
>Sent: Aug 15, 2008 4:21 PM
>To: Nick Gorham <[email protected]>, Development issues and topics for unixODBC <[email protected]>
>Subject: Re: [unixODBC-dev] (no subject)
>
>Nick,
>
>-----Original Message-----
>>From: Nick Gorham <[email protected]>
>>Sent: Aug 15, 2008 12:10 AM
>>To: Igor Korot <[email protected]>, Development issues and topics for unixODBC <[email protected]>
>>Subject: Re: [unixODBC-dev] (no subject)
>>
>>Igor Korot wrote:
>>
>>>Hi, (Nick),
>>>What is the proper way to call SQLConfigDataSource()?
>>>
>>>My code (pseudo-code):
>>>
>>>SQLWCHAR *dsn = "mySQL"
>>>SQLWCHAR param[254];
>>>ret = SQLConfigDataSource( HWND, ODBC_ADD_DSN, dsn, param );
>>>if( ret != SQL_SUCCESS )
>>>{
>>>// show error message
>>>}
>>>
>>>The code executes fine, according to the log file: function gives SQL_SUCCESS 2 times from SQLDataSourceW.c
>>>
>>>But then the program crashes.
>>>
>>>Doing "bt" in gdb shows that the crash occuring in the libodbcinst.so.1.
>>>
>>>Any thoughts?
>>>  
>>>
>>Seems ok, can you provide any code I can run that causes the problem?
>>
>>Do you set param to be empty first ?
>
>That's pretty much it.
>The only reason I said it's a pseudo-code, is because I am using wxWidgets library
>for development. They using UTF8 in SVN TRUNK.
>So, basically, I am converting initial string to be UTF16 (SQLWCHAR *dsn).
>
>Variable "param" is declared only, it is not initialized.
>Does it has to be like this:
>
>SQLWCHAR param[254] = "";
>
>>
>>-- 
>>Nick
>
>Thank you.

_______________________________________________
unixODBC-dev mailing list
[email protected]
http://mail.easysoft.com/mailman/listinfo/unixodbc-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.