Re: unixODBC-GUI-Qt: some text for www.unixodbc.org (enough to prime)

Nick Gorham <[email protected]>
Newsgroups gmane.comp.db.unixodbc.devel
Message-ID <[email protected]>
Peter Harvey wrote:

>I am pretty certain that the DM does not attempt to prompt for a data
>source when provided an empty 'in' string to SQLDriverConnect. This is
>something that could be added. For example;
>
>    if ( !conn_str_in )
>    {
>        /*
>         * not quite by the book, but better than nothing
>         */
>
>        conn_str_in = (SQLCHAR*)"DSN=DEFAULT;";
>        len_conn_str_in = strlen((char*) conn_str_in );
>    }
>
>
>The above code could be altered such that it goes into a UI plugin to
>get a data source to use. I could add the following to odbcinst;
>
>BOOL SQLDriverConnectPrompt( HWND  hWnd,  SQLCHAR *pszChars, SQLSMALLINT
>nMaxChars );
>
>And a corresponding call like this to the UI plugin (odbcinstQ4);
>
>BOOL ODBCDriverConnectPrompt( HODBCINSTWND  hWnd,  SQLCHAR *pszChars,
>SQLSMALLINT nMaxChars );
>
>--
>Peter
>  
>
Ok, I have added the code into the driver manager to call  
ODBCDriverConnectPrompt in the odbcinstQ lib if needed. So it needs the 
GUI part adding now to return a selected DSN name in pszChars, and a 
return of TRUE, or a return of FALSE on error, or no selection of DSN.

-- 
Nick Gorham
Easysoft Limited
http://www.easysoft.com, http://www.unixODBC.org

_______________________________________________
unixODBC-dev mailing list
[email protected]
http://mailman.unixodbc.org/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.