|
-
Aug 6th, 2000, 07:54 AM
#1
Thread Starter
New Member
I would like to know how can I declare an ADO connection on an global .asa. Do I have to use the <object> tag if so where it goes under sesion_onstart or applicattion_onstart or outsite these two preocedure?. please show me an example.
-
Aug 6th, 2000, 02:18 PM
#2
Guru
You want to put a connection OBJECT in a session variable? Or do just want to put the connection STRING in a session var?
-
Aug 6th, 2000, 03:52 PM
#3
Thread Starter
New Member
I just want ....
I just want to create the connection object like:
set objconnection = server.createobject"adodb.connection").
Note= what I really want is to create the connection object just once on an global .asa file and be able to access it from any pages in my web application instead of creating a connection each time I need a recorset..
[Edited by luisvb on 08-06-2000 at 04:54 PM]
-
Aug 7th, 2000, 11:06 AM
#4
Guru
Avoid putting ANY objects into SESSION or APPLICATION variables, as they kill your performance.
The "proper" way to do this is to open a connection on EVERY PAGE that needs to get data. IIS uses connection pooling for your DB, so access should be very fast, and its only 1 extra line of code per page (its worth it)
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
|