pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Meskes <meskes@postgresql.org>
To: Tim Kane <timk@hotgames.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: [INTERFACES] ECPG and sqlda
Date: Fri, 7 Jan 2000 21:16:47 +0100
Message-ID: <20000107211647.A420@fam-meskes.de> (raw)
In-Reply-To: <3874486C.1B529C0E@hotgames.com>
References: <3874486C.1B529C0E@hotgames.com>

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@Fam-Meskes.De           | Use PostgreSQL!



view thread (2+ messages)

Message-ID: <20000107211647.A420@fam-meskes.de>
Permalink:  ../20000107211647.A420@fam-meskes.de/
Also on:    postgresql.org/message-id/20000107211647.A420@fam-meskes.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: meskes@postgresql.org, timk@hotgames.com
  Subject: Re: [INTERFACES] ECPG and sqlda
  In-Reply-To: <20000107211647.A420@fam-meskes.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox