[unixODBC-dev] (no subject)

Stefan Radman Stefan.Radman at CTBTO.ORG
Tue Nov 15 08:38:48 GMT 2005


> commented comments? But maybe somebody did it on purpose? Can 
> anybody clarify that particular piece of code?
If I may.

Obviously the behaviour was fixed after 2.2.6 to comply with the specs
on MSDN
http://cvs.sourceforge.net/viewcvs.py/unixodbc/unixODBC/DriverManager/SQ
LDataSources.c?r1=1.5&r2=1.6 

IMHO the confusion came from the word "Description":

In the ODBC specs on MSDN the word "Description" is used for the unique
driver name as found in the registry under
  HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\
E.g.
  HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\SQL Server
On Windows this serves as the unique driver name and driver description
at the same time.
There is no additional "Description" attribute specified (for drivers).

In unixODBC the driver name (specified in square brackets) serves as the
unique driver identifier and is therefore functionally equivalent to
what the ODBC specs call driver "Description".
The additional unixODBC driver attribute "Description" is not mandatory
and is not meant to be unique e.g.

  [PostgreSQL]
  Description     = guess which driver this is
  Driver          = /usr/lib/libodbcpsql.so
  Setup           = /usr/lib/libodbcpsqlS.so

  [MySQL]
  Description    = guess which driver this is
  Driver         = /usr/lib/libmyodbc.so
  Setup          = /usr/lib/libodbcmyS.so

is perfectly valid and the changes you proposed would render
SQLDataSources() and SQLDrivers() completely useless.

Stefan
  
> -----Original Message-----
> From: unixodbc-dev-bounces at easysoft.com 
> [mailto:unixodbc-dev-bounces at easysoft.com] On Behalf Of Nick Gorham
> Sent: Tuesday, 15 November, 2005 08:53
> To: Igor Korot; Development issues and topics for unixODBC
> Subject: Re: [unixODBC-dev] (no subject)
> 
> Igor Korot wrote:
> 
> >
> >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).
> >  
> >
> Yes, but what does "Description" mean, show me that entry in the MS 
> registry and I will show you the name of the driver that 
> relates to the 
> odbcinst.ini line. If your ini has the path of the lib instead of the 
> section entry in odbcinst.in you will get what you describe.
> 
> >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?
> >  
> >
> You do always have the option of modifying your copy if you 
> want it to 
> work in a different way, we do have day jobs you know?
> 
> >I will fix it in my code, and see if it will be consistent 
> with the way MSDN describes it.
> >  
> >
> Ok.
> 
> -- 
> Nick
> _______________________________________________
> unixODBC-dev mailing list
> unixODBC-dev at easysoft.com
> http://mail.easysoft.com/mailman/listinfo/unixodbc-dev
> 
> 




More information about the unixODBC-dev mailing list