Author |
Message
|
vmcgloin |
Posted: Wed Oct 16, 2002 5:22 am Post subject: Database node question |
|
|
Knight
Joined: 04 Apr 2002 Posts: 560 Location: Scotland
|
This may be a silly question but...
Why when I am using a database as a temporary store in a single message flow, how do I tidy up aferwards?
I do an INSERT in one Database node.
I then do a SELECT from a Compute node later in the flow.
But, when I try to do a DELETE of the same data either after the select in the Compute node or in a new Database node, the data does not appear to be available for the earlier select.
Any suggestions? My message flow is transactional. If I do a db2 select command from the command line the data is there...
Thanks,
Vicky |
|
Back to top |
|
 |
jwende |
Posted: Wed Oct 16, 2002 7:15 am Post subject: |
|
|
 Novice
Joined: 02 Jul 2001 Posts: 23
|
to be very clear :
whats failing the SELECT or the DELETE statement ?
Joerg |
|
Back to top |
|
 |
vmcgloin |
Posted: Wed Oct 16, 2002 7:35 am Post subject: |
|
|
Knight
Joined: 04 Apr 2002 Posts: 560 Location: Scotland
|
Joerg,
Neither is actually giving an error, but the fields in the message that I am populating with the result of the SELECT statement are empty/null, implying that the SELECT is not working correctly.
Does it make sense to do a SELECT and DELETE of the same rows in a message flow?
I have not used a database with my flow before...
Thanks,
Vicky |
|
Back to top |
|
 |
wmqiguy |
Posted: Wed Oct 16, 2002 7:52 am Post subject: |
|
|
 Centurion
Joined: 09 Oct 2002 Posts: 145 Location: Florida
|
Since it sounds like you are doing all of this in one message flow, I would consider just saving off the data in the LocalEnvironment and then just referring to it later as necessary.
Instead of INSERT A,B,C
use
SET OutputLocalEnvironment.myVar1 = A;
SET OutputLocalEnvironment.myVar2 = B;
SET OutputLocalEnvironment.myVar3 = C;
In the Compute Node make sure you
1. Check LocalEnvironment and Message inthe Advanced tab
2. Copy the LocalEnvironment tree each time you pass through a compute node.
Hope that helps.  |
|
Back to top |
|
 |
vmcgloin |
Posted: Wed Oct 16, 2002 7:58 am Post subject: |
|
|
Knight
Joined: 04 Apr 2002 Posts: 560 Location: Scotland
|
Thanks for the suggestion
But it is the LocalEnvironment data that I am writing and retrieving from the database because the NEONRulesEvaluation node does not seem capable of propagating the Aggregate data stored there. It overwrites the LocalEnvironment rather than just adding to it.
Thanks though! |
|
Back to top |
|
 |
philip.baker |
Posted: Wed Oct 16, 2002 1:52 pm Post subject: |
|
|
 Voyager
Joined: 21 Mar 2002 Posts: 77 Location: Baker Systems Consulting, Inc. - Tampa
|
Try setting the Transaction mode to 'Commit' within the database node.
You may be having an issue with the record insert not being committed on the database until the end of the current message flow. Setting the 'Commit' will insert the record as a committed DB action before the message flow is complete. This should allow you to delete or operate on the inserted data from another node within the same flow. _________________ Regards,
Phil
Last edited by philip.baker on Wed Oct 16, 2002 1:54 pm; edited 1 time in total |
|
Back to top |
|
 |
|