Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EGate vs. Oracle.... the select saga

Status
Not open for further replies.

eaiGeek

Programmer
Aug 20, 2003
5
NZ
I am trying to do a MASSIVE select from an Oracle DB. Currently I am selecting about 888 rows.

I can select everything perfectly, the problem I am having is trying to put all 888 rows into ONE payload string. Each record has to go into the string, delimited by commas for the fields and some end delimiter for the records themselves.

Doing the commas is easy... and eve adding an end delimiter isn't too hard either - the hard part is how do I 'buffer' as it were all 888 records before I add them to the Payload string? Keeping performance in mind I am trying to steer away from another while loop attaching every record to the payload string after I go through the result set.

The code I have currently:

getNODE().getTableName(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY).select("WHERE blah blah ");

while (getNODE().getTableName().next() {

getDataToSend().setPayload(**data to send**)

}

If i put a getDataToSend().send statement inside the while loop I end up sending all the records individually not altogether. Any ideas????

Cheers


 
why don't you make the payload node a repeating node and assign the values for each record. After the while loop publish the that single event.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top