|
-
Aug 6th, 2000, 07:52 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 7th, 2000, 04:21 AM
#2
Dunno, but I do know that a lot of web hosting companies wouldn't appreove of doint this because it causes the connection to remain open permanently...bogging down the server.
Instead I tend to setup my connections (which will be used regularly on several pages) in a seperate page and use SSI to include this page in all the pages that need the connection.
-
Aug 7th, 2000, 10:26 AM
#3
Hyperactive Member
Here is an example:
Code:
<SCRIPT RUNAT = Server LANGUAGE = VBSCRIPT>
Sub Application_OnStart
Application("MyConnectionString") =
"DSN=FoodMart;User Id = sa;Password =;Description=FoodMart;
Server =MyServer;App=MyApp'sEnvironment;WSID =MyMachine;"
End Sub
</SCRIPT>
-
Aug 8th, 2000, 09:47 AM
#4
Thread Starter
New Member
when should I use global .asa
Thanks for the advise matthew.
So does My application will be slow when creating objects in global .asa?
what about variables in globlal .asa,
does varibles will slow my pages also?
So in which case should I use global .asa?
-
Aug 9th, 2000, 05:59 AM
#5
I don't know if it will be particularly slow on a low loaded server...it's the sites that host lots of people's asp website that discourage it because if they all do this then there will be loads of ADO connections open at the same time for ages and that could bog down a server.
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
|