RE: libpq.dll and VB

From: Magnus Hagander <mha(at)sollentuna(dot)net>
To: "'Finn Kettner'" <fk(at)akf(dot)dk>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: RE: libpq.dll and VB
Date: 2000-08-25 11:31:51
Message-ID: 215896B6B5E1CF11BC5600805FFEA82103D97CB4@sirius.edu.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > If you also need the function definitions, check libpq-fe.h for C
> > style syntax. (It's in src/interfaces/libpq)
>
> I need function definitions and structure (called Type in VB)
> definitions, and yes I have looked in libpq-fe.h, actually this is
> the placed where the dll is build :-). But as mentioned earlier, the
> structures for PGconn and PGresult is not in this file (they are
> typedef'ed directly from pg_conn and pg_result, which I can't find in
> any of the included files, so I actually wonder how the dll is build
> in the first place???).
Ahh. Ok. Those are defined in 'libpq-int.h', in the same directory. But be
careful with possibly accessing any of the members directly - use the
accessor functions instead.
They have been moved into the -int file in order to make it harder to find
them directly for just that reason :-)

> > As a sidenote, you may be much better off using ADO with the ODBC
> > driver - it's definitly move VB-friendly.
>
> Yes, but what I forgot to tell you, is that I'm trying to create a
> activex control, which is to be placed on a (intranet) web page,
> using the Esker plugin, so ODBC is not the best way to go, as that
> would need a ODBC-connection be set up on each client machine, which
> are to use the activex control, so that's why I need to go directly
> to the dll file (which can be fetched from the page). To set up an
> ODBC connection you would need to install the psqlodbc.dll anyway, so
> why not take the direct way.
Ok, that puts it in different light. You could always construct the
connection string on-the-fly so you don't need to create an actual
datasource (specifying the driver manually), but you would still ned to get
the DLL file onto the client, possibly along with some registry entries.
(For libpq, you definitly need only the DLL, and nothing in the registry).

//Magnus

Browse pgsql-hackers by date

  From Date Subject
Next Message Finn Kettner 2000-08-25 11:58:43 RE: libpq.dll and VB
Previous Message Jules Bean 2000-08-25 11:19:04 [jules@jellybean.co.uk: Performance on inserts]