Re: Need help with ODBC Driver development

From: markw(at)mohawksoft(dot)com
To: "Sudip Banerjee" <sudip(at)litrol(dot)com>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Need help with ODBC Driver development
Date: 2004-12-15 15:07:39
Message-ID: 16854.24.91.171.78.1103123259.squirrel@mail.mohawksoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

> I am currently in the beginning processes of development for an ODBC
> driver. I really need direction in how to basically create one and I hope
> you can get me into contact with somebody who can give me pointers. The
> areas I need help with are the following:
>
> What is the exact format of the ODBC .dll that needs to be created so that
> it is recognized by windows?

AFAIK, the ODBC driver is simply a Windows DLL with some standard exported
functions.

>
> What code is needed to able to register the ODBC driver in the registry
> and to make it show up as a data source?

Ahh, an ODBC driver is not an OLE/COM object, it is a dll. You need to
find odbc*.ini

>
> When the ODBC driver shows up as a data source and you click to add a
> driver and double click on the ODBC driver, how is
> that menu created which shows the configuration for ODBC?

That is either in the DLL or in another DLL, I forget.

>
> How do you make the ODBC driver recognize incoming SQL calls so the
> functions within are called automatically?

That's the job of the ODBC driver. (That's what you are writing)

>
> I know there are entry points to the .dll but how does it recognize the
> SQL calls coming in?

The user opens a registered data source. The ODBC layer loads and
initializes the DLL. All the SQL calls to that connection go to that DLL.

>
> In what format can I access the output from the .dll?

Huh?

>
> Also, if I make the ODBC driver in C++, can I make a C# program to access
> the outcoming data directly?

It's only software, so the answer is always yes, but the degree of
difficulty is the point. C# should be able to do ODBC.

C# is crap anyway, it is a bogus ripoff of Java. Use C or C++.

>
>
> Also, can you please let me know about a way to create an .msi file which
> is used to install an ODBC driver on a windows system.

Get MSDN if you need that info. In fact, it sounds like you are trying to
make a Windows program, judging from the questions you are asking, I'd say
you need MSDN.
>
> How is that file created and how can I make it so it automatically
> installs the ODBC driver that I want to create?

Get MSDN.

>
> Finally, I tried to compile the psqlodbc source that was provided on the
> website but it would not complete. Is there a way to fully compile this
> project to create a .dll on windows?

There are so many variables that can affect this that a simple sentence
saying you have a problem gives anyone interested in helping you nothing
to work with.

>
> This questions I have above are basic questions in regards to ODBC
> development but with somebody who has experience in making one can really
> help me out here. Please let me know who I can talk to in regards to my
> questions. Thank you very much.
>
> If you can let me know about these processes, that would be very much
> appreciated! Thanks!

Step (1) Get a Windows development environment if you want to develop for
WIndows.

Step (2) It sounds like you don't really understand Windows or don't have
access to documentation, so get MSDN and read.

Step (3) Somewhere, I recall seeing a text file based ODBC sample driver.
It is *everything* you need to create a working ODBC driver. Just gut the
framework and fill it in with the code for your system.

Alternative:
Hire a consultant that has this stuff already.

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Marten Feldtmann 2004-12-15 18:55:43 Re: Need help with ODBC Driver development
Previous Message Sudip Banerjee 2004-12-13 23:59:12 Need help with ODBC Driver development