I have a small console application written on C# .NET 2.0. The application queries a database and takes a certain amount of id numbers, by which it then addresses a web service and get some "statuses" according to the id numbers. Then the statuses are written back to the database. Trough out the whole process I keep an open connection to the database, which I'm not sure to be the best way for batch processing as long as the application blocks the database engine and other clients are unable to work properly. Opening and closing a connection for each operation does not seem wise as well.
What would be considered as the best way to handle those batch processes?