Ask a Question related to ASP Database, Design and Development.
-
michaaal #1
Can I open a database connection in my GLOBAL.ASA file?
Can I use my GLOBAL.ASA file to open a database connection before each page
loads? Would someone mind posting a very simple example? I tried to make
it work but couldn't. Thanks!
michaaal Guest
-
global security - with NO internet connection?
just upgraded my machine that has no internet connection to flash 8- I double clicked on my tried and true .swf file, developed in 7.2 - and it... -
DB Connection :: Global.use vs .Inc file?
I am adapting a login script to suite my specific purposes by require guideance on best practice with regards the following: Should I be... -
Open file, make changes, save file, close, re-open, file contents not changed
I've now run into this several times and it's completely destroyed all of my confidence in Ilustrator CS on Mac. I'm hoping someone can confirm that... -
Global.asa and DSN-less database connections
OBJECTIVE: I am trying to create a connection to an access database in and then use that connection ASP pages in my application without having to... -
Can I use database commands in my Global.ASA file?
Can I use database commands in my Global.ASA file like this...? Sub Session_OnStart Public adoCon Dim recset Set adoCon =... -
Roji. P. Thomas #2
Re: Can I open a database connection in my GLOBAL.ASA file?
You can, But NEVER do that.
Acquire resources late and release early.
Bu opening a connection and making every pages to reuse it
you are creating a bottlenect by forcing your pages to use the same
connection.
and you will not get the benefit of connection pooling.
Open the connection only when you need a DB access and close it immediately.
--
Roji. P. Thomas
SQL Server Programmer ;)
________________________
"michaaal" <res0gyio@verizon.net> wrote in message
news:%235rUJl%23sDHA.3144@tk2msftngp13.phx.gbl...page> Can I use my GLOBAL.ASA file to open a database connection before each> loads? Would someone mind posting a very simple example? I tried to make
> it work but couldn't. Thanks!
>
>
Roji. P. Thomas Guest
-
Jeff Cochran #3
Re: Can I open a database connection in my GLOBAL.ASA file?
On Wed, 26 Nov 2003 00:55:38 -0600, "michaaal" <res0gyio@verizon.net>
wrote:
Sure. And *every* page would open it, even if it didn't need a>Can I use my GLOBAL.ASA file to open a database connection before each page
>loads?
database connection. You could really bog down a decent site that
way. :)
Open a connection when needed, close and destroy the object as soon as
you're through with it. In fact, you can go further and use an
IF/THEN to only open the connection if there's a reason on the page.
I see a lot of pages open a connection, then test the data returend
from a query string only to find they reject the request. The
connection gets opened but never used.
Jeff
Jeff Cochran Guest
-
Aaron Bertrand [MVP] #4
Re: Can I open a database connection in my GLOBAL.ASA file?
> Can I use my GLOBAL.ASA file to open a database connection before each
pageNo. You could open a connection object that stays open for the life of the> loads?
session (and often session.timeout minutes afterward), but this is very
wasteful and inefficient. See [url]http://www.aspfaq.com/2053[/url] for reasons.
--
Aaron Bertrand
SQL Server MVP
[url]http://www.aspfaq.com/[/url]
Aaron Bertrand [MVP] Guest



Reply With Quote

