[unixODBC-dev] (no subject)

Nick Gorham nick.gorham at easysoft.com
Wed Nov 16 09:32:03 GMT 2005


Igor Korot wrote:

>Nick, Stefan and others,
>When I earlier said that I have more work to, I meant that I need to find a function that will give me a list of DSN names for specified driver.
>On Windows I could easily do it as:
>
>SQLDrivers( HENV, SQL_FETCH_FIRST, driverDesc, length1, &descrLength, atrib, length2, &atrLength );
>SQLDataSources( HENV, direction, dsn, lengthDsn, &cb1, dsnDesc, lengthDesc, &cb2 );
>if( driverDesc == dsnDesc )
>// found the DSN for the driver specified
>
>But apparently on unixODBC this is not the case, as SQLDrivers() returns the driver name in the 3rd parameter, and SQLDataSources() return the library name for the driver in the 6th parameter.
>
>So, now I am stuck. Is it possible to get such info without modifying the code significantly?
>  
>
Thats what I don't understand. As long as your ini files are set out as 
unixODBC expects you will get the driver name. The description field you 
mention is not in any way related to the driver name, as Stefan showed.

-- 
Nick



More information about the unixODBC-dev mailing list