On Sun, Mar 28, 1999 at 06:37:28PM +0200, Herouth Maoz wrote:
> It can easily be done with libpq, though. Instead of what you wrote above,
> you simply have to build the query correctly:
>
> strcpy( str, 'table_name' );
>
> sprintf( query, "INSERT INTO %s VALUES ('%s', %d)", str, "Rome", 10 );
>
> result = PQexec( conn, query );
Which is essantially the same as
exec sql execute immediate :query;
:-)
Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael(dot)Meskes(at)gmx(dot)net | Use PostgreSQL!