Re: [INTERFACES] ECPG and sqlda

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: Tim Kane <timk(at)hotgames(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] ECPG and sqlda
Date: 2000-01-07 20:16:47
Message-ID: 20000107211647.A420@fam-meskes.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On Thu, Jan 06, 2000 at 06:46:52PM +1100, Tim Kane wrote:
> There doesn't seem to be any support for the SQLDA...

Correct. ECPG does not support SQLDA. AFAIK SQLDA is not standard anyway.

> Does this mean that I can't do proper dynamic queries?
>
> eg: select * from :table where :field = :result

You can. How about this?

exec sql prepare STMT from "select * from ? where ? = ?";

exec sql declare cur cursor for STMT;

exec sql open cur using :table, :field, :result;

> Somebody please tell me that I'm wrong!
> The test files in the source don't seem to utilize this feature at all.

test[2|3].pgc do use prepare.

> ECPGstatus() seems to have changed to ECPGstatus (int, const char);
> What exactly am I supposed to pass to this function?

The first argument is the line-number (i.e. __LINE__). The second is the
connection name. If you do not have different connections you can use NULL
as connection name or just use "CURRENT".

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(at)Fam-Meskes(dot)De | Use PostgreSQL!

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Ken J. Wright 2000-01-07 21:49:29 Re: [INTERFACES] ODBC oin Windows
Previous Message Joe Shevland 2000-01-07 19:23:25 Re: [INTERFACES] query java object?