Ask a Question related to ASP Database, Design and Development.
-
aidanh #1
Keeping connections open
I am very new to asp, and I am wondering what is the best way to get around a this problem
I use asp to give me a status on a database which is changing frequently. I open a connection to the database at the begining of the the script, and then execute a command to obtain a recordset
If I want the information in the asp page to be constantly up to date, the only way I can see to do this is to refresh the page at intervals, which opens the database again, and executes command again
Is there a neater way to do this? Or is this the only way
aidanh
aidanh Guest
-
MX Open Database Connections
Did MX do away with the settings for database connections? We just switched from Oracle 8i to Oracle 9i and have seen some connectivity failures. ... -
MX 6.1 / MySQL 3.23 - Open Connections
We have been noticing that the Client Variables db connections are not closing even when we set timeouts and turn off Connection pooling. I've... -
Keeping Connection Open - Consequences?
I have an application where I need to keep the connection open because my application monitors 2 separate databases ever 1 second. Is there a... -
Timing out connections in Open Transport
Hi, I'm using Open Transport TCP/IP to implement a database server in OS 9. (I'm working on carbonizing it for OS X). It all works OK except... -
tidy connections left open
Many a page has ADO Connection objects that were opened but never closed. The Connection object allocates its own resources when it is opened. ... -
CJM #2
Re: Keeping connections open
It's generally considered good practice to get in & get out as quickly as
possible. This means you should open your connection at the last moment, do
your stuff, then rest the connection as quickly as possible.
Given this, your solution is the right way (providing you ARE closing the
connect afterwards(?)).
If you use the same connection string each time, it will keep using the same
pooled connection, which is another good practice to adopt.
So in answer to your question... this IS the neat way...
Chris
"aidanh" <anonymous@discussions.microsoft.com> wrote in message
news:904C39DB-D8E0-47B9-B314-4963116BB55A@microsoft.com...around a this problem:> I am very new to asp, and I am wondering what is the best way to getI open a connection to the database at the begining of the the script, and>
> I use asp to give me a status on a database which is changing frequently.
then execute a command to obtain a recordset.only way I can see to do this is to refresh the page at intervals, which>
> If I want the information in the asp page to be constantly up to date, the
opens the database again, and executes command again.>
> Is there a neater way to do this? Or is this the only way?
>
> aidanh
CJM Guest
-
Bob Barrows [MVP] #3
Re: Keeping connections open
aidanh wrote:
If you have no client-side code restirctions, then you can use XMLHTTP to do> I am very new to asp, and I am wondering what is the best way to get
> around a this problem:
>
> I use asp to give me a status on a database which is changing
> frequently. I open a connection to the database at the begining of
> the the script, and then execute a command to obtain a recordset.
>
> If I want the information in the asp page to be constantly up to
> date, the only way I can see to do this is to refresh the page at
> intervals, which opens the database again, and executes command
> again.
>
> Is there a neater way to do this? Or is this the only way?
>
> aidanh
this without refreshing the page. Please follow-up in a client-side coding
newsgroup (one of the scripting groups, or one of the groups with "dhtml" in
their names) if you wish to pursue this option.
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Bob Barrows [MVP] Guest



Reply With Quote

