|
-
Feb 1st, 2005, 09:17 PM
#1
Thread Starter
Lively Member
SqlDataReader & ExecuteNonQuery
I'm looping through a reader checking various data and am wanting to update it with an ExecuteNonQuery.
The problem I'm facing is that when I try to run the ExecuteNonQuery within the reader loop I get the following error - "There is already an open Datareader associated with this connection which must be closed first".
I know I can't run an ExecuteNonQuery isnide a datareader but what are my alternatives? I'm just wanting to run a very simple update query half way through each while loop pass.
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
|