From nasko@gyuvetch.bg Tue Dec 28 23:31:06 2004 X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8F8B13A9649 for ; Tue, 28 Dec 2004 23:31:06 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 90563-10 for ; Tue, 28 Dec 2004 23:30:53 +0000 (GMT) Received: from ns.netinfo.bg (ns.netinfo.bg [194.153.145.66]) by svr1.postgresql.org (Postfix) with ESMTP id 6EC563AC01C for ; Tue, 28 Dec 2004 23:30:53 +0000 (GMT) Received: from webmail.gyuvetch.bg (app3.ni.bg [192.168.151.6]) by ns.netinfo.bg (Postfix) with SMTP id 3058B2A78 for ; Wed, 29 Dec 2004 01:32:45 +0200 (EET) Received: (qmail 6684 invoked from network); 28 Dec 2004 23:30:50 -0000 Received: from app3.ni.bg (192.168.151.6) by webmail.gyuvetch.bg with SMTP; 28 Dec 2004 23:30:50 -0000 Message-ID: <2088005755.1104276650100.JavaMail.nobody@app3.ni.bg> Date: Wed, 29 Dec 2004 01:30:50 +0200 (EET) From: Atanas Atanasov To: pgsql-odbc@postgresql.org Subject: Writing a new driver Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4579_51327044.1104276650022" X-Mailer: AbvMail 1.0 X-Originating-IP: 195.158.109.8 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.555 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, HTML_20_30, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200412/59 X-Sequence-Number: 4793 ------=_Part_4579_51327044.1104276650022 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable Hello mates,=20 I am trying to write a simple ODBC driver for Windows. It can also be OLE D= B or DAO driver but the final aim is to connect to a non-standard DBMS norm= ally through ADO, DAO, OLE DB or ODBC etc. I tried to find any documentatio= n o nline but it is very little. There are a few SDKs but they are not free= so I cannot use any of them.=20 In case any of you, who have developped the psqlODBC driver, know any sourc= e, have any tutorial, or can explain how can someone can write a simple rea= d (and maybe after this read/write) driver please send it to me by email.= =20 I imagine it will be sort of a program implementing a standart interface wh= ich o n its back end will interact customly with a DBMS, files etc.=20 Any help will be appreciated.=20 Regards,=20 Atanas Atanasov=20 ----------------------------------------------------------------- SMS =E8=E7=E2=E5=F1=F2=FF=E2=E0=ED=E5 =E7=E0 =EF=EE=EB=F3=F7=E5=ED=EE =EF= =E8=F1=EC=EE - http://promo.abv.bg/new_sms.html ------=_Part_4579_51327044.1104276650022 Content-Type: text/html; charset="windows-1251" Content-Transfer-Encoding: quoted-printable

Hello mates,

I am trying to write a simple ODBC driver for Windows= . It can also be OLE DB or DAO driver but the final aim is to connect to a = non-standard DBMS normally through ADO, DAO, OLE DB or ODBC etc. I tried to= find any documentation o nline but it is very little. There are a few SDKs= but they are not free so I cannot use any of them.

In case any of yo= u, who have developped the psqlODBC driver, know any source, have any tutor= ial, or can explain how can someone can write a simple read (and maybe afte= r this read/write) driver please send it to me by email.

I imagine it= will be sort of a program implementing a standart interface which o n its = back end will interact customly with a DBMS, files etc.

Any help will= be appreciated.

Regards,

Atanas Atanasov



-----------------------------------------------------------------=
=D0=E0=E7=E1=E5=F0=E5=F2=E5 =EA= =E0=EA =E4=F0=F3=E3=E8=F2=E5 =EF=E5=F7=E5=EB=FF=F2! ------=_Part_4579_51327044.1104276650022-- From psql@shemesh.biz Fri Dec 31 07:46:04 2004 X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9E44F3A194D for ; Fri, 31 Dec 2004 07:46:04 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 60869-08 for ; Fri, 31 Dec 2004 07:45:46 +0000 (GMT) Received: from latenight.fiasco.org.il (latenight.fiasco.org.il [192.117.122.39]) by svr1.postgresql.org (Postfix) with SMTP id 4CB863A19BA for ; Fri, 31 Dec 2004 07:44:24 +0000 (GMT) Received: (qmail 32632 invoked from network); 31 Dec 2004 07:44:20 -0000 X-Scanned-By: AMaViS-ng at latenight.fiasco.org.il Received: from unknown (HELO ?172.16.19.2?) (192.117.105.82) by latenight.fiasco.org.il with SMTP; 31 Dec 2004 07:44:19 -0000 Message-ID: <41D50352.4040100@shemesh.biz> Date: Fri, 31 Dec 2004 09:44:18 +0200 From: Shachar Shemesh Organization: Lingnu Open Source Consulting ltd. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5 X-Accept-Language: en MIME-Version: 1.0 To: Atanas Atanasov Cc: ODBC PostgreSQL Subject: Re: Writing a new driver References: <2088005755.1104276650100.JavaMail.nobody@app3.ni.bg> In-Reply-To: <2088005755.1104276650100.JavaMail.nobody@app3.ni.bg> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.031 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200412/60 X-Sequence-Number: 4794 Atanas Atanasov wrote: > Hello mates, > > I am trying to write a simple ODBC driver for Windows. It can also be > OLE DB or DAO driver but the final aim is to connect to a non-standard > DBMS normally through ADO, DAO, OLE DB or ODBC etc. I tried to find > any documentation o nline but it is very little. There are a few SDKs > but they are not free so I cannot use any of them. > > In case any of you, who have developped the psqlODBC driver, know any > source, have any tutorial, or can explain how can someone can write a > simple read (and maybe after this read/write) driver please send it to > me by email. > > I imagine it will be sort of a program implementing a standart > interface which o n its back end will interact customly with a DBMS, > files etc. > > Any help will be appreciated. > > Regards, > > Atanas Atanasov > Hi Atanas, First of all, the official documentation can be found online at http://msdn.microsoft.com. Documentation for ODBC is available at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/dasdkodbcoverview.asp, and for OLE DB at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/oledb/htm/dasdkoledboverview.asp. Our of curiosity, what development tools were you thinking of using? If you were going to use Visual Studio, the SDK comes as part of the package. The same is true for most other packages as well. Even MinGW, which is free (both speech and beer). Depending on the use you need for this driver, you can start off from one of the existing drivers. You can use psqlODBC, PgOleDb, or any other open source ODBC or OLE DB driver out there. Please do pay attention to the license, however. If your driver needs to be closed source, don't use either one of the two I mentioned, as their license does not allow such use. In addition to that, in case this is relevant to you, my company does software consulting. We developed the PostgreSQL OLE DB provider (PgOleDb). Feel free to contact me privately for a price quote on a similar project. Hope this helps, Shachar -- Shachar Shemesh Lingnu Open Source Consulting ltd. http://www.lingnu.com/ From M.Feldtmann@t-online.de Fri Dec 31 10:43:55 2004 X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3EB383A1A03 for ; Fri, 31 Dec 2004 10:43:55 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 12280-03 for ; Fri, 31 Dec 2004 10:43:48 +0000 (GMT) Received: from mailout01.sul.t-online.com (mailout01.sul.t-online.com [194.25.134.80]) by svr1.postgresql.org (Postfix) with ESMTP id 291D93A19F3 for ; Fri, 31 Dec 2004 10:43:49 +0000 (GMT) Received: from fwd01.aul.t-online.de by mailout01.sul.t-online.com with smtp id 1CkKG3-0008Pr-03; Fri, 31 Dec 2004 11:43:47 +0100 Received: from [192.168.70.2] (TEG5fmZaZe4JJhBBGD907MsA8BkAUrVrsQgCu9rydHj9M4FGNX8qQl@[217.251.70.42]) by fwd01.sul.t-online.com with esmtp id 1CkKFr-0rxi3U0; Fri, 31 Dec 2004 11:43:35 +0100 Message-ID: <41D52D57.7090408@t-online.de> Date: Fri, 31 Dec 2004 11:43:35 +0100 From: M.Feldtmann@t-online.de (Marten Feldtmann) Organization: Private User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: de-DE, de, en-us, en MIME-Version: 1.0 To: Atanas Atanasov Cc: pgsql-odbc@postgresql.org Subject: Re: Writing a new driver References: <2088005755.1104276650100.JavaMail.nobody@app3.ni.bg> In-Reply-To: <2088005755.1104276650100.JavaMail.nobody@app3.ni.bg> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-ID: TEG5fmZaZe4JJhBBGD907MsA8BkAUrVrsQgCu9rydHj9M4FGNX8qQl X-TOI-MSGID: aff68d7e-a850-4aa4-9f6e-cbf62e521be8 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200412/61 X-Sequence-Number: 4795 Atanas Atanasov schrieb: > Hello mates, > > I am trying to write a simple ODBC driver for Windows. > There's a book available "Inside ODBC" from MS, showing the overall structure and the idea of ODBC - just to get main ideas. Then, there are free sources available: * SAP-DB drivers (rock solid drivers and working unter Windows, Linux and Solaris ... up to 7.4.x), drivers from 7.5 are not free any more .... * Firebird (very actice ODBC develpment ...) Marten From psql@shemesh.biz Sun Jan 2 07:56:57 2005 X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DC39B3A2BC5 for ; Sun, 2 Jan 2005 07:56:57 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 90039-05 for ; Sun, 2 Jan 2005 07:56:44 +0000 (GMT) Received: from latenight.fiasco.org.il (latenight.fiasco.org.il [192.117.122.39]) by svr1.postgresql.org (Postfix) with SMTP id D55403A2BEC for ; Sun, 2 Jan 2005 07:56:43 +0000 (GMT) Received: (qmail 16700 invoked from network); 2 Jan 2005 07:56:40 -0000 X-Scanned-By: AMaViS-ng at latenight.fiasco.org.il Received: from unknown (HELO ?172.16.19.2?) (192.117.105.82) by latenight.fiasco.org.il with SMTP; 2 Jan 2005 07:56:39 -0000 Message-ID: <41D7A936.2080201@shemesh.biz> Date: Sun, 02 Jan 2005 09:56:38 +0200 From: Shachar Shemesh Organization: Lingnu Open Source Consulting ltd. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5 X-Accept-Language: en MIME-Version: 1.0 To: Atanas Atanasov , ODBC PostgreSQL Subject: Re: Writing a new driver References: <82029076.1104502018286.JavaMail.nobody@app2.ni.bg> In-Reply-To: <82029076.1104502018286.JavaMail.nobody@app2.ni.bg> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.026 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/2 X-Sequence-Number: 4797 Atanas Atanasov wrote: > Deat Shachar Shemesh, > > I have got all the stuff from Microsoft i.e. Visual Studio 6.0, 2003 > .NET, 2005 .NET, MSDN, Platform SDK for XP SP2 and 2003 Server. > Actually I am not really sure whether I need an ODBC driver exactly or > not. My aim is this. I have a not very popular DBMS which doesn't > support any king of external interface except its own integrated language. > Is it an SQL one? Does it support things such as updateable cursors? > Actually there is a DLL which can be used but the programming with it > id not very easy, i.e. it resembles more an API (like ODBC API) but > not the modern toold like ADO etc. > ADO contains no direct database interactions. It's just a wrapper around ODBC or OLE DB. Either technologies will give you ADO support. > So it is possible to program with it but it takes quite, some time. My > aim is to create a sort of bridge between this dll ot the dbms > directly, so that it will allow me to use it with ADO from ASP and > Visual Basic. > That's exactly what the existing drivers for Postgres do. In ODBC the backend API is directly implemented, while in PgOleDb libpq is used, but either way, they are pretty much just adapting layers between what PostgreSQL can do and what the driver is expected to know how to do. > I am not sure whether I need exactly an ODBC driver. It might be > something else but the end result should be an simplified interfacing > model through ADO (or could be DAO as well, but preferably ASP). > Either ODBC or OLE DB will give you that (ADO, DAO and ASP). There are some considerations as to what's preferable, but those no one can help you without knowing a little more on what you're trying to do. > So regarding the driver itself, I read that it should, kind of, > redefine a set of standard functions in a DLL and that all tha info I > have. All I need is a very simple driver which read from text files > from example. I saw the many open source drivers available, but at > this stage they are of no use, due to a number of reasons. First they > are definitely involved with the internal structure of the sql server > (mysql, psql, msql etc), and secondlt the source is for multiplatform. > So all I am seeing is a lot of source without any logical connection > or at least sort of explanation from where to start from. I need loke > a step by step tutorial in creatin ga driver. > There should be examples in the MS site. In any case, what's the DBMS? Is it open source? > If you think that the problem is solvable otherwise, please suggest > something. > No, a driver is what you need. I think, though, you are expecting it to be easy. Don't. Figuring out what the APIs mean is a non-trivial task. I tend to think that it's less trivial for OLE DB than for ODBC, but maybe it's just because I am doing the former and haven't tried the later beyond shallow maintaining. There are other differences, performance being a major one. OLE DB is expected to return all the results at once, yielding slightly better performance. Still, if you are going to go for developing this on your own, pick whatever works best for you. I don't think that the existing drivers are too multi-platform. They are built around the particular databases' semantics, because that's what a driver is. Still, they should prove a fairly good starting point, ASSUMING THE LICENSE IS RIGHT. I can't stress this point enough. If you can't afford for the resulting driver to be open source, don't use any of the open source drivers. At least PostgreSQL's and MySQL's are under a copyleft license, which means you are not allowed to use them without releasing the resulting code as open source yourself. Don't be a copyright violator. If you can't open source the resulting code, don't use anything that is GPL or LGPL. One last word of advice. If you need this for a commercial reason, consider hiring someone who's already been there. Driver development takes a lot of patience and reading through docs trying to understand the semantics of the API. Much more so than writing code that uses that very same API. You are seeing this already - the docs we pointed you to are the docs we work by. There is nothing more. It will usually be much simpler, probably cheaper, definitely faster, to use a commercial body to develop it for you. Pick someone who has already done this sort of development in the past. Like I said earlier, Lingnu is good candidate for OLE DB drivers, but we won't do an ODBC one. Haven't before, and there are others who'll probably do it better. Shachar -- Shachar Shemesh Lingnu Open Source Consulting ltd. http://www.lingnu.com/