View Single Post
  #3 (permalink)  
Old January 17th, 2008, 06:54 PM
Chris Van Duin Chris Van Duin is offline
Registered User
 
Join Date: Jan 2008
Location: , , Australia.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Also, if you use this method, you can use the same connection object so there shouldn't be much of a time penalty performing the two queries. Most of the time is actually taken up connecting to a database.

Remember to set all database objects (connection, command and datareader)to nothing when finished otherwise you will consume resources. You usually do this as the last step after you populate your dataset, eg, in the Finally step if you wrap your code in a try/cathc block.
Reply With Quote