On Thu, March 2, 2006 18:45, [EMAIL PROTECTED] wrote:
> I will try upgrading later, but since its only the test part that did not
> work completely, the libpqxx might work right? I'm a beginner to C++ and
> libpqxx and postgresql, so I'm wondering if there is any sample code
> (C++) for doing the following simple thing:
> 1. connecting to a database on my computer
> 2. inserting something in a table
> 3. selectiong something is a table.

"Yes" to both questions!

The test programs are there for two purposes:

1. Make sure that as much as possible of libpqxx is tested in as many
environments as possible.  In some specific ways they are designed to have
*more* problems than actual applications.  So yes, there is definitely a
chance that your applications will still work.

2. Provide examples.  The first working example is in the README of
course, but you can find examples of every libpqxx function in
test/test*.cxx.  Test #13 is the first one to insert data into a table. 
When reading this code, bear in mind that these programs try to find bugs;
they do a lot of checking that a normal program does not need to do. 
Don't be confused by that and don't try to duplicate all the checks in
your own code.

HTH,

Jeroen


_______________________________________________
Libpqxx-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/libpqxx-general

Reply via email to