RE: libpq.dll and VB

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема RE: libpq.dll and VB
Дата
Msg-id 215896B6B5E1CF11BC5600805FFEA82103D97CB4@sirius.edu.sollentuna.se
обсуждение исходный текст
Ответ на libpq.dll and VB  ("Finn Kettner" <fk@akf.dk>)
Список 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jules Bean
Дата:
Сообщение: [jules@jellybean.co.uk: Performance on inserts]
Следующее
От: Brook Milligan
Дата:
Сообщение: advice on extensions needed