Hello,
Environment:
- PgDac 1.10.0.5
- PostgreSQL 8.3
- Platform: windows
I have a master-detail insertions on a Transaction.
Table2 -> MasterDetail -> Table1
Ie:
Connection.StartTransaction;
Table1.Append;
(fill fields)
Table1.Post;
//--
:1
Table2.Append;
(here I have a TPgQuery to get the last line on Table2)
(SELECT max line+1 FROM t2 where .....)
(Set parameters for that TPgQuery)
(Open -or refresh- TPgQuery)
Table2.FieldByName.. := TPgQuery.fieldbyname('...').AsInteger;
Table2.Post;
: GOTO 1:
Connection.Commit;
When I do the First TPgQuery.Open (or refresh) all is ok, but when I go to :1 (append a new line) and re-open (refresh here) the TPgQuery I get a EPgError Exception:
'Cursor 'PORTALST1375588814' already exists';
I have only found this on my google search:
http://www.postgresql.org/docs/6.4/stat ... eclare.htm
What is this and how to avoid this error ?
Greetings.