-
Debugging problem
1. When I run Script debugger and I start my ASP app, I put a breakpoint in the global.asa on the Session_OnEnd event.
But I see that this event fires when I start my application!
Why does this happen?
2. Also, On most of my pages I retrive or save data to a SQL database, Currently I have a Connection string in a include file that I include on all my pages. Is it better to just put my Connection string in the Global.asa's Session_OnStart ??
3. Do I need to close my connectionstring in the Session_OnEnd?
4. Can I put Include files in my Global.asa?
5. How do I declare my ADO constants in my global.asa?
-
1. When you restart an application, all current sessions end.
2. Yes, as long as it's just the string and not an actual connection object.
3. No, it's just a string. You would open and close the db connection on the individual pages that access the database.
4. I don't think so.
5. I believe you can use a TypeLib to get all constants in the dll. (I keep a printout of ADOVBS.INC by my desk and type the actual values in when I need them rather than using constants).
-
You can add the ADODB type library but only if you are using IIS 5.0. 4. doesn't support this. (I found out the hard way a while back)
If your using 4.0, you have to either use the literals (Like JoshT does) or include the ADOVBS.INC file on each page that uses ADO constants.