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
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