[unixODBC-dev] (no subject)
ikorot at earthlink.net
Tue Nov 15 04:24:34 GMT 2005
I just verified that information. And according to what I am looking for this is inconsistent with what the Microsoft provides.
Determines which data source the Driver Manager returns information on. Can be:
SQL_FETCH_NEXT (to fetch the next data source name in the list), SQL_FETCH_FIRST (to fetch from the beginning of the list), SQL_FETCH_FIRST_USER (to fetch the first user DSN), or SQL_FETCH_FIRST_SYSTEM (to fetch the first system DSN).
When Direction is set to SQL_FETCH_FIRST, subsequent calls to SQLDataSources with Direction set to SQL_FETCH_NEXT return both user and system DSNs. When Direction is set to SQL_FETCH_FIRST_USER, all subsequent calls to SQLDataSources with Direction set to SQL_FETCH_NEXT return only user DSNs. When Direction is set to SQL_FETCH_FIRST_SYSTEM, all subsequent calls to SQLDataSources with Direction set to SQL_FETCH_NEXT return only system DSNs.
Pointer to a buffer in which to return the data source name.
Length of the *ServerName buffer, in characters; this does not need to be longer than SQL_MAX_DSN_LENGTH plus the null-termination character.
Pointer to a buffer in which to return the total number of bytes (excluding the null-termination byte) available to return in *ServerName. If the number of bytes available to return is greater than or equal to BufferLength1, the data source name in *ServerName is truncated to BufferLength1 minus the length of a null-termination character.
Pointer to a buffer in which to return the description of the driver associated with the data source. For example, dBASE or SQL Server.
This is from the latest MSDN, and I believe that this code was always in that implementation. Now, the correct code is in place for the file "unixODBC/DriverManager/SQLDataSources.c", but it's commented out (lines 301-307 in 2.2.12), and the code that returns the library name with the full path is returned instead (lines 309-314 of the same file).
Could somebody please fix it according to the MSDN, and the commented comments? But maybe somebody did it on purpose? Can anybody clarify that particular piece of code?
I will fix it in my code, and see if it will be consistent with the way MSDN describes it.
From: Nick Gorham <nick.gorham at easysoft.com>
Sent: Nov 7, 2005 2:46 AM
To: Igor Korot <ikorot at earthlink.net>, Development issues and topics for unixODBC <unixodbc-dev at easysoft.com>
Subject: Re: [unixODBC-dev] (no subject)
Igor Korot wrote:
>I was looking at the unixODBC version 2.2.6, and I found some inconsistency. Hopefully this is already fixed in the 2.2.11, but I want to make sure...
>When I started coding with the 2.2.6, I used the function SQLDataSources(). Because my code run, and I didn't get what I was suppose to, I started looking. The 6th parameter of the function should return the description of the driver in the file odbcinst.ini. With the unixODBC 2.2.6, the function returned the Driver library name.
>I just hoped that with the fix of the SQLConfigDataSource() and the ODBCConfig will run successfully I will be able to check this as well. But I hope that somebody already mentined this here, and it's already been fixed.
>unixODBC-dev mailing list
>unixODBC-dev at easysoft.com
Yes, I think that has now changed, On windows it returns the driver
name, not the description as such, but the text that could be used in
the DRIVER= part of a connect string, so I believe the unixODBC version
is to return the Driver= entry, but to not convert that to the actual
More information about the unixODBC-dev