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 AE17C329F21 for ; Tue, 28 Sep 2004 19:14:32 +0100 (BST) 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 29761-08 for ; Tue, 28 Sep 2004 18:14:21 +0000 (GMT) Received: from conure.mail.pas.earthlink.net (conure.mail.pas.earthlink.net [207.217.120.54]) by svr1.postgresql.org (Postfix) with ESMTP id EB2C232A08F for ; Tue, 28 Sep 2004 19:14:07 +0100 (BST) Received: from user-0ce2mrj.cable.mindspring.com ([24.225.91.115] helo=LEIBNIZ) by conure.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 1CCMUH-0006BI-00; Tue, 28 Sep 2004 11:14:06 -0700 To: "Greg Campbell" Cc: Dave Page , pgsql-odbc@postgresql.org Subject: Re: Non-Proprietary ODBC Examples on Win32? References: <41597068.407@us.michelin.com> From: Randy Yates Organization: The Universal Church of Christ Date: Tue, 28 Sep 2004 14:14:04 -0400 In-Reply-To: <41597068.407@us.michelin.com> (Greg Campbell's message of "Tue, 28 Sep 2004 10:08:40 -0400") Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Rational FORTRAN, windows-nt) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/93 X-Sequence-Number: 4468 Greg/Dave, First, thanks for your responses. The value of having real people to discuss these things with should not be underestimated. I had already installed the postgres ODBC driver. The problem is in programmatically interfacing to it. Using ODBC inevitably comes down to making some calls to a library function (either static or dynamic via import libraries). I don't want to depend on MSVC++ CDatabase class or any of the other MS crap. I want to interface with a free ODBC library. Part of the reason is that I want to be able to target the application for either a unix or win32 host. Am I making sense? --RY "Greg Campbell" writes: > Get yourself an ODBC driver for Windows -- from the PostgreSQL site -- > I recommend version 7.3.2. > > Set yourself up a Data Source Name. You can alternatively check the > PostgreSQL documentation on creating a connection string. > > Then use MSDN or google up SQLAllocHandle and SQLConnect. There should > be C++ examples aplenty. > > > Dave Page wrote: > >> >>>-----Original Message----- >>> From: pgsql-odbc-owner@postgresql.org >>> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Randy Yates >>>Sent: 28 September 2004 14:50 >>>To: pgsql-odbc@postgresql.org >>>Subject: [ODBC] Non-Proprietary ODBC Examples on Win32? >>> >>>Hi, >>> >>> Is there a C++ example somewhere of accessing an ODBC datasource >>> under win32 using only public/free libraries? I think I can find >>> the ODBC driver libraries OK, but finding a free, public-source >>> driver manager for win32 seems to be problematic. iODBC and >>> unixODBC don't run under win32 as far as I know. Of course I may be >>> totally hosed. I am completely new to postgresql and ODBC >>> programming. If my mental model is flawed and I'm asking the wrong >>> questions, please educate me. >> >>Modern Windows versions have a driver manager built in. I know it's not >>Open Source, but then neither is the rest of the OS. Also, as Microsoft >>wrote the standard, their implementation is pretty compliant :-) >> >>Check out msdn.microsoft.com for the ODBC SDK and documentation. >> >>Regards, Dave. >> >>---------------------------(end of broadcast)--------------------------- >>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org >> > > -- > Greg Campbell Work: 803-951-5561 > Systems Engineer Fax: 803-951-5531 > Michelin North America > ENG-IT > 2420 Two Notch Road > Lexington, SC 29071 -- % Randy Yates % "Though you ride on the wheels of tomorrow, %% Fuquay-Varina, NC % you still wander the fields of your %%% 919-577-9882 % sorrow." %%%% % '21st Century Man', *Time*, ELO http://home.earthlink.net/~yatescr