Sunday, March 13, 2005

One more thing

When using the Sql adapter to receive batches of data, a couple of handy hints:

1. Use a stored procedure. It allows you more control and security, and abstracts the underlying table structure.

2. Always add a parameter that allows you to restrict the size of the output (using SET ROWCOUNT). This allows you to control the flow of input messages - if there's a chance that your sproc is going to pick up 10,000 records, it's probably going to be easier to control if you poll for 100 messages every x seconds, rather than attempting to take the whole lot in one go.

No comments: