Reader not opening a second time
-
Hi, I have a wep page that reads from a database in order to get background colors for certain buttons on the page. It works fine when you go to the page and when there is a postback event. When i navigate away from the page and try to go back to it i get an error message that says "Invalid attempt to read when reader is closed" Does anyone have any suggestions on how to fix this? Thanks, Tommy
-
Hi, I have a wep page that reads from a database in order to get background colors for certain buttons on the page. It works fine when you go to the page and when there is a postback event. When i navigate away from the page and try to go back to it i get an error message that says "Invalid attempt to read when reader is closed" Does anyone have any suggestions on how to fix this? Thanks, Tommy
-
Yes. all of that is located in subprocedures inside of a module i have
-
Yes. all of that is located in subprocedures inside of a module i have
Basically, it's just like the error message says. Somewhere in your code you're attempting to reuse a reader object that you have already closed. Without looking at some code, all I can suggest is that you debug your code and keep track of where connections and readers are being opened/closed to detect the discrepancy. Regards, Alvaro
Victory means exit strategy, and it's important for the President to explain to us what the exit strategy is. -- GWB, 1999.
-
Basically, it's just like the error message says. Somewhere in your code you're attempting to reuse a reader object that you have already closed. Without looking at some code, all I can suggest is that you debug your code and keep track of where connections and readers are being opened/closed to detect the discrepancy. Regards, Alvaro
Victory means exit strategy, and it's important for the President to explain to us what the exit strategy is. -- GWB, 1999.
Ok so i have gone through in debug mode and so forth and when it gets to my subprocedure thats calls info from the database it gets to the point of myconn.open then errors out. Is there a way i can force it to open the reader no matter what b/c i cant find a single spot where it would be closed. Or what could cause the reader to not open?