| daniel007 2005-01-17, 5:53 pm |
| Hello,
I have this situation in which I want to get one row from SQL server,
process it and move to the next one until my select return no rows.
So I built orchestration with a receive shape that receives row by this
select:
SELECT top 1 PkId, ...
FROM Mytable
Where processed = 0
Order by date
Using SQL adapter, I put this receive inside a loop shape and after
processing I’m updating the "processed" field to 1.
But the problem is that I have no idea how to check if no rows where
selected and then to stop the loop, more then that I think the receive shape
is always waiting for a row (run the select command every timeout until row
is selected).
So somebody know if there is away to know if non-was received and how to
make the receive shape to make the select only once with no delays?
(Of course I can write stored procedure that will return xml with field
“count” or something like that, but I wanted for a way via biztalk….)
Thanks for any help…
|