I'm a bit rusty on C++ string mashing, but surely sizeof() is not the
correct way to determine the number of bytes presently stored in a
variable-length string?
* PQputCopyEnd(conn, msg);
Yes, I've had several people mention this and that did the trick.
Thanks to all that replied.
You might try porting your code to libpqxx, which is C++-native and should
make large swathes of this sort of code unnecessary.
I've seriously considered it (along with the npgsql library), but am
not really sure as to what the advantage(s) would be considering that
(with the corrections
On Sat, May 01, 2004 at 02:25:01AM -0700, Tony Reina wrote:
You might try porting your code to libpqxx, which is C++-native and should
make large swathes of this sort of code unnecessary.
I've seriously considered it (along with the npgsql library), but am
not really sure as to what the
I read in the manual that the libpq functions PQputline(conn, cmd) and
PQendcopy(conn) have been deprecated and that PQputCopyData(conn, cmd,
sizeof(cmd)) and PQputCopyEnd(conn, msg) are the replacements.
I'm trying to convert a program that works just fine with the old
functions. I assume I'm
On Fri, Apr 30, 2004 at 06:12:35AM -0700, Tony Reina wrote:
CString cmd, msg;
cmd.Format(1\t\2\t{3,4,5}\n);
* PQputCopyData(conn, cmd, sizeof(cmd));
cmd.Format(\\.\n);
* PQputCopyData(conn, cmd, sizeof(cmd));
* PQputCopyEnd(conn, msg);
Old C++
[EMAIL PROTECTED] (Tony Reina) writes:
* PQputCopyData(conn, cmd, sizeof(cmd));
I'm a bit rusty on C++ string mashing, but surely sizeof() is not the
correct way to determine the number of bytes presently stored in a
variable-length string?
* PQputCopyEnd(conn, msg);
You want to