|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Can't Fix Run-Time ErrorAttached is part of a Web site I'm working on. (I've attached it to retain formatting.) When it runs I get the following error on the line that says ERROR HERE!: "There is already an open DataReader associated with this Command which must be closed first." I don't get this. I'm calling Close on my data reader each time through the loop. How can this be corrected? Thanks for any advice. I figured this out. It has nothing to do with what the error message says.
Instead, it is the connection that must be closed first. I fixed by creating a second connection and using that for the inner loop. However, that doesn't seem very efficient. Would sure you love to see an efficient example where data is read using a loop within a loop. Thanks. Show quote "Jonathan Wood" <jw***@softcircuits.com> wrote in message news:uqULD$6MHHA.4720@TK2MSFTNGP03.phx.gbl... > Greetings, > > Attached is part of a Web site I'm working on. (I've attached it to retain > formatting.) When it runs I get the following error on the line that says > ERROR HERE!: > > "There is already an open DataReader associated with this Command which > must be closed first." > > I don't get this. I'm calling Close on my data reader each time through > the loop. How can this be corrected? > > Thanks for any advice. > > -- > Jonathan Wood > SoftCircuits Programming > http://www.softcircuits.com > > > |
|||||||||||||||||||||||