From: | "Heinrich Retzlaw" <hretzlaw(at)etm(dot)at> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | fetch in embedded sql |
Date: | 2001-05-23 06:55:59 |
Message-ID: | 9efmu2$3rl$1@news.tht.net |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
hello,
i have written the following method for c++
bool DB::getPresentations(Presentations &pr)
{
exec sql begin declare section;
int rID;
char pre[20];
exec sql end declare section;
rID = pr.roomID;
exec sql BEGIN TRANSACTION;
exec sql DECLARE cur CURSOR FOR
SELECT Presantation
FROM Presantations
WHERE RoomID=:rID;
exec sql OPEN cur;
// here
exec sql FETCH FORWARD 1 IN cur INTO :pre;
// and here
exec sql CLOSE cur;
exec sql COMMIT TRANSACTION;
}
if i start this method i get the following error belonging to the comments
"here" and "and here" in the code above
NOTICE: current transaction is aborted, queries ignored until end of
transaction block
NOTICE: current transaction is aborted, queries ignored until end of
transaction block
if i do the begin, declare cursor and fetch statement manually in the psql
database there is no error
thanks for every answer
best regards heinrich retzlaw
From | Date | Subject | |
---|---|---|---|
Next Message | J.H.M. Dassen Ray | 2001-05-23 07:49:56 | Re: pg_dump fails, data integrity imperfect |
Previous Message | Eric G. Miller | 2001-05-23 06:44:35 | Re: initdb doesn't work with cygwin 1.3.1? |