pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: markw@mohawksoft.com
To: Sudip Banerjee <sudip@litrol.com>
Cc: pgsql-odbc@postgresql.org
Subject: Re: Need help with ODBC Driver development
Date: Wed, 15 Dec 2004 10:07:39 -0500 (EST)
Message-ID: <16854.24.91.171.78.1103123259.squirrel@mail.mohawksoft.com> (raw)
In-Reply-To: <110298235210661646@sudip>
References: <110298235210661646@sudip>

> 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.



view thread (2+ messages)  latest in thread

Message-ID: <16854.24.91.171.78.1103123259.squirrel@mail.mohawksoft.com>
Permalink:  ../16854.24.91.171.78.1103123259.squirrel@mail.mohawksoft.com/
Also on:    postgresql.org/message-id/16854.24.91.171.78.1103123259.squirrel@mail.mohawksoft.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: markw@mohawksoft.com, sudip@litrol.com
  Subject: Re: Need help with ODBC Driver development
  In-Reply-To: <16854.24.91.171.78.1103123259.squirrel@mail.mohawksoft.com>
  References: <110298235210661646@sudip> <16854.24.91.171.78.1103123259.squirrel@mail.mohawksoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox