I've got a problem on my aspx-page when I'm using SQL-connections.
What I'm trying to do is this:
1. Open a Connection (Conn1)
2. Open a datareader (based on Conn1)
3. Loop through the reader
4. Run a SQLcommand inside the "reader-loop" and use the Conn1 as connection.
But it doesn't work!
I gets an error-msg where it says that conn1 is locked as long as the datareader uses it.
Does this mean that I must create a new connetion-object for each command/reader a want to use in the same time? That sounds hard if I'm using nestled loops with readers/commands.
Any ideas? Thanks in advance!




Reply With Quote