From: | Eric(dot)Boyer at insa-toulouse(dot)fr (Eric BOYER) |
---|---|
To: | |
Subject: | [Pljava-dev] After an insert, the trigger can't find the row |
Date: | 2005-08-26 08:24:38 |
Message-ID: | 430ED1C6.10603@insa-toulouse.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pljava-dev |
Hello,
My ddr configuration is :
AFTER INSERT ON exploitation.groupe
FOR EACH ROW
EXECUTE PROCEDURE exploitation.alloTrigger();
In my trigger, i would like to do a select to be sure the row is in my
db (because the trigger is fired before the commit if we are in a
transaction).
So, I have in my class fired by trigger a select on my new row.
------------------------------------------------------------------------------------
rsTrigger=td.getNew();
System.out.println("ID "+rsTrigger.getString(1));
int gid_number=rsTrigger.getInt(1);
query="Select * from exploitation.groupe where gid_number="+gid_number;
rs = select.executeQuery(query);
System.out.println("Begin");
while (rs.next()) {
System.out.println("nb ="+rs.getString(1));
}
System.out.println("End");
----------------------------------------------------------------------------------------
I have this info in the log :
ID 170
Select * from exploitation.groupe where gid_number=170
Debut
Fin
--------------------------------------
And the class don't find the last row in the database.
If I launch a select by hand, i find this last row :
SELECT * from exploitation.groupe where gid_number=170;
gid_number | lib_groupe | lic_groupe
------------+------------+------------
170 | a | b
(1 ligne)
I suppose the row is really inserted in the bd after the execution of
the trigger !
Can you help me please ...
Eric
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Hallgren | 2005-08-26 08:49:01 | [Pljava-dev] After an insert, the trigger can't find the row |
Previous Message | Thomas Hallgren | 2005-08-20 06:10:26 | [Pljava-dev] World-wide Stop Order on PERL, Python, Java::->> Use Ruby instead |