Thread: Passing arguments
Can anyone show me few examples on passing variable values to query parameters??? I've tryed to search anything on google, but there is nothing useful. To be more specific I need examples with libpq library, wich meens I need code in C programming language. I've tryed examples from PostgreSQL source, but they also does not work! What I've learned is that I have to use PQexecParam... I need query wich will insert some data in postgresql database, but with 7 query parameters wich are variables (integers).
If someone know's hot to help, I will be gratefull!
If someone know's hot to help, I will be gratefull!
On Tue, Sep 12, 2006 at 11:30:54AM +0200, pr0v4 wrote: > Can anyone show me few examples on passing variable values to query > parameters??? I've tryed to search anything on google, but there is nothing > useful. To be more specific I need examples with libpq library, wich meens I > need code in C programming language. I've tryed examples from PostgreSQL > source, but they also does not work! What I've learned is that I have to use > PQexecParam... I need query wich will insert some data in postgresql > database, but with 7 query parameters wich are variables (integers). What did you try and how did it not work? Did you get compile-time errors? Run-time errors? Unexpected behavior? Is there a reason you're using C instead of a higher-level language like Perl, Ruby, Python, etc.? -- Michael Fuhr