Thread: How to connect via C++?

How to connect via C++?

From
Maxim Maletsky
Date:
Hello,
 
I typically write applications in PHP, but know also a bit of C++.
There's a task I want to do with C++, it also includes reading from and writing to a PostgreSQL database.
 
How do I do that on C++?
 
What libraries are?
Compilers?
...where to start?
 
I am on FreeBSD.
 

Sincerely,

 Maxim Maletsky
  Web Developer

 Digital Media,
 Japan Inc Communications
  www.japaninc.com
  maxim@japaninc.com
  TEL: 03-3499-2175 x 1271
  FAX: 03-3499-3109

 

Re: How to connect via C++?

From
"J. T. Vermeulen"
Date:
On Mon, 14 May 2001, Maxim Maletsky wrote:

> There's a task I want to do with C++, it also includes reading from and
> writing to a PostgreSQL database. 
>  
> How do I do that on C++?
>  
> What libraries are?

Use either libpq++ (C++ library), or if you're into that kind of thing, use
the C library libpq directly.  In the latter case of course, remember to 
include the headers in extern "C" blocks as usual.  Either way you'll probably
have to look through the libpq documentation.


> Compilers?

Whatever works.  Try g++.


Jeroen



RE: How to connect via C++?

From
"Michael Ansley (UK)"
Date:
<p><font size="2">-----BEGIN PGP SIGNED MESSAGE-----</font><br /><font size="2">Hash: SHA1</font><p><font size="2">Or,
ofcourse, you could use embedded SQL (using the ecpg compiler). </font><br /><font size="2">This is quite convenient if
youare familiar with embedded SQL.</font><p><font size="2">Cheers...</font><br /><p><font size="2">MikeA</font><br
/><br/><p><font size="2">>> -----Original Message-----</font><br /><font size="2">>> From: J. T. Vermeulen
[<ahref="mailto:jtv@cistron-office.nl">mailto:jtv@cistron-office.nl</a>]</font><br /><font size="2">>> Sent: 15
May2001 12:18</font><br /><font size="2">>> To: Maxim Maletsky</font><br /><font size="2">>> Cc:
pgsql-interfaces@postgresql.org</font><br/><font size="2">>> Subject: Re: [INTERFACES] How to connect via
C++?</font><br/><font size="2">>> </font><br /><font size="2">>> </font><br /><font size="2">>> On
Mon,14 May 2001, Maxim Maletsky wrote:</font><br /><font size="2">>> </font><br /><font size="2">>> >
There'sa task I want to do with C++, it also includes </font><br /><font size="2">>> reading from and</font><br
/><fontsize="2">>> > writing to a PostgreSQL database. </font><br /><font size="2">>> >  </font><br
/><fontsize="2">>> > How do I do that on C++?</font><br /><font size="2">>> >  </font><br /><font
size="2">>>> What libraries are?</font><br /><font size="2">>> </font><br /><font size="2">>> Use
eitherlibpq++ (C++ library), or if you're into that </font><br /><font size="2">>> kind of thing, use</font><br
/><fontsize="2">>> the C library libpq directly.  In the latter case of course, </font><br /><font
size="2">>>remember to </font><br /><font size="2">>> include the headers in extern "C" blocks as usual. 
Either</font><br /><font size="2">>> way you'll probably</font><br /><font size="2">>> have to look through
thelibpq documentation.</font><br /><font size="2">>> </font><br /><font size="2">>> </font><br /><font
size="2">>>> Compilers?</font><br /><font size="2">>> </font><br /><font size="2">>> Whatever
works. Try g++.</font><br /><font size="2">>> </font><br /><font size="2">>> </font><br /><font
size="2">>>Jeroen</font><br /><font size="2">>> </font><br /><font size="2">>> </font><br /><font
size="2">>>---------------------------(end of </font><br /><font size="2">>>
broadcast)---------------------------</font><br/><font size="2">>> TIP 4: Don't 'kill -9' the
postmaster</font><br/><font size="2">>> </font><p><font size="2">-----BEGIN PGP SIGNATURE-----</font><br /><font
size="2">Version:PGPfreeware 6.5.3 for non-commercial use <<a href="http://www.pgp.com"
target="_blank">http://www.pgp.com</a>></font><p><font
size="2">iQA/AwUBOwEYinympNV/C086EQJYcwCfe2HOTlXTahQ0jtUrab24/fg9DRcAoJCv</font><br/><font
size="2">UjIgqWyz3qdXpQAUkQ55w7EQ</font><br/><font size="2">=xJW0</font><br /><font size="2">-----END PGP
SIGNATURE-----</font><code><fontsize="3"><br /><br />
_________________________________________________________________________<br/> This e-mail and any attachments are
confidentialand may also be privileged and/or copyright <br /> material of Intec Telecom Systems PLC (or its affiliated
companies).If you are not an <br /> intended or authorised recipient of this e-mail or have received it in error,
pleasedelete <br /> it immediately and notify the sender by e-mail. In such a case, reading, reproducing, <br />
printingor further dissemination of this e-mail is strictly prohibited and may be unlawful. <br /> Intec Telecom
SystemsPLC. does not represent or warrant that an attachment hereto is free <br /> from computer viruses or other
defects.The opinions expressed in this e-mail and any <br /> attachments may be those of the author and are not
necessarilythose of Intec Telecom <br /> Systems PLC. <br /><br /> This footnote also confirms that this email message
hasbeen swept by<br /> MIMEsweeper for the presence of computer viruses. <br />
__________________________________________________________________________<br/></font></code>