[unixODBC-support] Named Driver vs full path for Driver

Peter Harvey pharvey at peterharvey.org
Thu Jan 8 18:19:50 GMT 2009


Perhaps __find_lib_name() should be modified to allow both names to work in
getting driver entries...

char *getDriverLongName( char *szDriverLongName, char *szDriverShortName )
{
	with odbcinst.ini
		szDriverLongName = DRIVER entry where section name is
szDriverShortName
}

char *getDriverShortName( char *szDriverShortName, char *szDriverLongName )
{
	with odbcinst.ini
		szDriverShortName = section name where DRIVER is
szDriverLongName
}

if ( szDriver is a filename )
{
	strcpy( szDriverLongName, szDriver );
	getDriverShortName( szDriverShortName, szDriverLongName );
}
else
{
	strcpy( szDriverShortName, szDriver );
	getDriverLongName( szDriverLongName, szDriverShortName );
}


--
Peter

> -----Original Message-----
> From: unixodbc-support-bounces at mailman.unixodbc.org [mailto:unixodbc-
> support-bounces at mailman.unixodbc.org] On Behalf Of Nick Gorham
> Sent: Thursday, January 08, 2009 8:55 AM
> To: Support for the unixODBC project
> Subject: Re: [unixODBC-support] Named Driver vs full path for Driver
> 
> Jeff Martin wrote:
> 
> >If the section entry for a DSN in an odbc.ini file uses a full path
> >for the Driver entry, will any of the content of odbcinst.ini be used?
> >
> >
> >Suppose the I have the following:
> >
> >odbc.ini
> >======================
> >[DsnDriverPath]
> >Description=Use a full path for the driver
> >Driver=/usr/local/somedb/lib/libodbc.so
> >Server=test
> >User=test
> >{...etc...}
> >
> >[DsnDriverNamed]
> >Description=Use a named driver
> >Driver=SomeDB
> >Server=test
> >User=test
> >{...etc...}
> >======================
> >
> >
> >
> >odbcinst.ini
> >======================
> >[SomeDB]
> >Driver=/usr/local/somedb/lib/libodbc.so
> >Threading=0
> >=======================
> >
> >
> >
> >Will both DsnDriverPath and DsnDriverName "see" the Threading=0 in the
> >odbcinst.ini?   Or will only the DsnDriverNamed "see" the Threading=0?
> >
> >
> 
> No, only DsnDriverNamed as there is no link from DsnDriverName to
> SomeDB. The ability to bipass odbcinst.ini was originally added to cope
> with ini files from older driver managers.
> 
> --
> Nick
> _______________________________________________
> unixODBC-support mailing list
> unixODBC-support at mailman.unixodbc.org
> http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support



More information about the unixODBC-support mailing list