pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
More VB
5+ messages / 4 participants
[nested] [flat]

* More VB
@ 1999-07-24 02:48  Stephen Martin Trans-Euro I.T Ltd <stephen@sealteam.demon.co.uk>
  0 siblings, 1 reply; 5+ messages in thread

From: Stephen Martin Trans-Euro I.T Ltd @ 1999-07-24 02:48 UTC (permalink / raw)
  To: pg-interfaces <pgsql-interfaces@hub.org>

Hello,
whilst it seems driving libpq.dll from VB might be a difficult enterprise..
is it still not possible to just connect a socket to port 5432 of where ever
and
start communicating with postgres through a socket?  TCP or UDP?

Just like simple email clients connect to port 110 of a server and send

user fred
pass mypass

list

RETR 1

etc ...

any thoughts on this?

Stephen





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: [INTERFACES] More VB
@ 1999-07-24 15:27  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Stephen Martin Trans-Euro I.T Ltd <stephen@sealteam.demon.co.uk>
  0 siblings, 1 reply; 5+ messages in thread

From: Tom Lane @ 1999-07-24 15:27 UTC (permalink / raw)
  To: Stephen Martin Trans-Euro I.T Ltd <stephen@sealteam.demon.co.uk>; +Cc: pg-interfaces <pgsql-interfaces@hub.org>

"Stephen Martin Trans-Euro I.T Ltd" <stephen@sealteam.demon.co.uk> writes:
> whilst it seems driving libpq.dll from VB might be a difficult
> enterprise..  is it still not possible to just connect a socket to
> port 5432 of where ever and start communicating with postgres through
> a socket?  TCP or UDP?

Sure, if you can cope with binary-oriented data structures being
returned to you by the server.  (The actual data is text, as long as you
don't use BINARY CURSORs, but it's wrapped in header and count fields
that are not.)  libpq isn't doing anything that's particularly magic.
See the "Frontend/Backend Protocol" chapter of the Developer's Guide for
all the gory details of the client-to-server protocol.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: [INTERFACES] More VB
@ 1999-07-25 02:10  Byron Nikolaidis <byron.nikolaidis@home.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Byron Nikolaidis @ 1999-07-25 02:10 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Stephen Martin Trans-Euro I.T Ltd <stephen@sealteam.demon.co.uk>; pg-interfaces <pgsql-interfaces@hub.org>



Tom Lane wrote:
> 
> "Stephen Martin Trans-Euro I.T Ltd" <stephen@sealteam.demon.co.uk> writes:
> > whilst it seems driving libpq.dll from VB might be a difficult
> > enterprise..  is it still not possible to just connect a socket to
> > port 5432 of where ever and start communicating with postgres through
> > a socket?  TCP or UDP?
> 
> Sure, if you can cope with binary-oriented data structures being
> returned to you by the server.  (The actual data is text, as long as you
> 

I think I missed part of the conversation, but my take on it is that if
you already have a "libpq.dll", it should be fairly straightforward to
map the functions of the dll to VB, just as long as the dll follows
certain rules in how it exports the functions.   I have created dll's
before, and mapped the functions to VB quite successfully.  The only
thing to worry about on the VB side is to correctly map the 'C' function
arguments and return values to VB data types.

Byron



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* RE: [INTERFACES] More VB
@ 1999-07-26 07:51  Ansley, Michael <Michael.Ansley@intec.co.za>
  0 siblings, 0 replies; 5+ messages in thread

From: Ansley, Michael @ 1999-07-26 07:51 UTC (permalink / raw)
  To: 'Stephen Martin Trans-Euro I.T Ltd' <stephen@sealteam.demon.co.uk>; pg-interfaces <pgsql-interfaces@hub.org>

This is a pain-in-the-butt way of doing it.  I means that you have to learn
how PGs protocol operates.  Give it a week or so, and I'll send you a COM
server, with a nice VB interface.  I'm busy with this at the moment.

Stephen Martin wrote:
>> 
>> Hello,
>> whilst it seems driving libpq.dll from VB might be a 
>> difficult enterprise..
>> is it still not possible to just connect a socket to port 
>> 5432 of where ever
>> and
>> start communicating with postgres through a socket?  TCP or UDP?
>> 



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* RE: [INTERFACES] More VB
@ 1999-07-26 07:55  Ansley, Michael <Michael.Ansley@intec.co.za>
  0 siblings, 0 replies; 5+ messages in thread

From: Ansley, Michael @ 1999-07-26 07:55 UTC (permalink / raw)
  To: 'Byron Nikolaidis' <byron.nikolaidis@home.com>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Stephen Martin Trans-Euro I.T Ltd <stephen@sealteam.demon.co.uk>; pg-interfaces <pgsql-interfaces@hub.org>

No, it's not, as some people, including me, will tell you, from bitter
experience.  The problem is some of the types that are used by the library.
VB doesn't handle certain C types very well, there are better COM types that
support the VB interface quite handily, and it's better to use C to do the
casting.

MikeA

Byron Nikolaidis wrote:
>> Tom Lane wrote:
>> > 
>> > "Stephen Martin Trans-Euro I.T Ltd" <stephen@sealteam.demon.co.uk>
writes:
>> > > whilst it seems driving libpq.dll from VB might be a difficult
>> > > enterprise..  is it still not possible to just connect a socket to
>> > > port 5432 of where ever and start communicating with postgres through
>> > > a socket?  TCP or UDP?
>> > 
>> > Sure, if you can cope with binary-oriented data structures being
>> > returned to you by the server.  (The actual data is text, as long as
you
>> > 
>> 
>> I think I missed part of the conversation, but my take on it 
>> is that if
>> you already have a "libpq.dll", it should be fairly 
>> straightforward to
>> map the functions of the dll to VB, just as long as the dll follows
>> certain rules in how it exports the functions.   I have created dll's
>> before, and mapped the functions to VB quite successfully.  The only
>> thing to worry about on the VB side is to correctly map the 
>> 'C' function
>> arguments and return values to VB data types.



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~1999-07-26 07:55 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-07-24 02:48 More VB Stephen Martin Trans-Euro I.T Ltd <stephen@sealteam.demon.co.uk>
1999-07-24 15:27 ` Tom Lane <tgl@sss.pgh.pa.us>
1999-07-25 02:10   ` Byron Nikolaidis <byron.nikolaidis@home.com>
1999-07-26 07:51 RE: [INTERFACES] More VB Ansley, Michael <Michael.Ansley@intec.co.za>
1999-07-26 07:55 RE: [INTERFACES] More VB Ansley, Michael <Michael.Ansley@intec.co.za>

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