[unixODBC-dev] Design of SQLConfigDataSource

Bill Medland billmedland at mercuryspeed.com
Wed Nov 30 14:45:21 GMT 2005


On November 30, 2005 12:03 am, Nick Gorham wrote:
> Bill Medland wrote:
> >The Pervasive Linux driver does not appear to include
> > ConfigDSN and so I guess I'll have to throw something
> > together into the hacked setup dll.
> >
> >But what is going on with the design and how come it is
> > working for anyone?
>
> Historically Peter created the ODBCProverties interface to
> allow for simpler setup lib creation, its a easy job to create
> a lib using this method, Look at the Postgres some for a
> example.

Um.  I did.  I wrote one.  I said so.
Now, are we talking about the same thing?
I used the example of the DRVConfig/PostgreSQL, Oracle and MySQL 
code to create a libPvPsqlS.so which included the 
ODBCINSTGetProperties function.  I added it as the Setup DLL 
using ODBCConfig.  I proved it worked by using ODBCConfig to 
configure a Pervasive setting.

>
> But, the standard way of doing this, involves the driver
> managing its own dialog. I added this as a option, if the lib
> supports it. So the code, will try and call the SQLConfig
> interface, if found, else it will try the Properties. We
> (Easysoft) have the SQLConfig  in some of our drivers, and I
> think Peter has added it to MyODBC, the ones in the setup dir
> are examples of using the Properties interface.

What?  am I misreading the code?

In odbcinst/SQLConfigDataSource.c it seems quite clear to me that 
it looks for the Setup DLL, looks for the ConfigDSN function in 
the Setup DLL (not the driver DLL) and calls that.  So I added a 
ConfigDSN to my setup dll and I see that it does indeed get 
called.  That's when I started getting confused.

I grepped for ConfigDSN and saw references in the MySQL and 
PostgreSQL code, e.g in Drivers/MySQL/setup.c.  Now I presume I 
can't build that yet since I don't have the Qt libraries, but I 
presume that is the source code of the driver library, which is 
NOT where SQLConfigDataSource looks.

That.. is why I am confused.

I'm looking for an explanation rather than spending hours trying 
to set up the build.  I know, I'm lazy.
-- 
Bill Medland
mailto:billmedland at mercuryspeed.com
http://webhome.idirect.com/~kbmed



More information about the unixODBC-dev mailing list