|
-
August 11th, 2004, 06:36 AM
#1
Connection pooling with Async queries?
I want to use an Asynchronous callback mechanism to run seperate queries, each on a new thread. Each query updates a database table and returns a Boolean indicating if the correct number of rows were submitted (and if the rows have errors or not, etc). When the method that executes the query returns, the callback method (of the object which called the method asynchronously via BeginInvoke()) then checks to see if the value is false. If it is false then an event is fired to notify any interested subscribers who can take whatever action is appropriate at the time.
I want to know: can I take advantage of connection pooling here? Do I just need to open a new connection in the execute query method each time and connection pooling is automatic? Or do I need to do more work and pass a reference to an open connection to each new ExecuteQuery object for it to use?
If some code or UML would help to make it clearer what I'm trying to do, let me know and I'll post something.
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|