Search Postgresql Archives

Re: Prepared statements aren't working with parameters with PQexecParams

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 5, 2008 at 2:52 AM, Subspace god <subspacegod@xxxxxxxxx> wrote:

> The following does not work in C++, executed as above, in another session
> using two subsequent calls to PQexecParams
>
> PREPARE myquery (text) AS INSERT INTO myTable (word) VALUES ($1);
> EXECUTE myquery($1::text);

You're doing prepared statements incorrectly. Use PQprepare() and
PQexecPrepared() when using them from libpq; don't do them by hand on
your own.

-- 
- David T. Wilson
david.t.wilson@xxxxxxxxx


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux