BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Websnap + ADO

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet WebSnap
View previous topic :: View next topic  
Author Message
Gunnar Liknes
Guest





PostPosted: Tue Aug 30, 2005 8:52 am    Post subject: Websnap + ADO Reply with quote



Hi,

I have made a small Websnap ISAPI app that has a webdatamodule with
an ADOconnection and a webpage with a ADOStoredproc which uses
the connection in the datamodule.

Everything works fine to start with, however after some hours I get a
connection error. Its like the connection to the database is lost..

Does anyone have any ideas of what may cause this?

Thanks!
Gunnar


Back to top
Jon Lennart Aasenden
Guest





PostPosted: Sun Nov 20, 2005 1:02 am    Post subject: Re: Websnap + ADO Reply with quote



Hei

Constant connections to databases are resource expensive.
Like other connections, they tend to time out.

Simply test the connection before using it in your procedures.
I dont use ADO (mysql is my favorite) so i dont know how you should do this,
but i believe you can just check the "active" or "connected" property.

Start all your request handling code with somthing like:

if not dbCon.Connected then
Begin
if not ReEstablishConnection then
Begin
Response.SendRedirect('dberror.html');
Exit;
end;
end;

Alternatively, check out coreLab's excellent components.
No dependencies and very fast.

Jon Lennart Aasenden

"Gunnar Liknes" <gliknesATglobalDASHsatcomDOTcom> wrote

Quote:
Hi,

I have made a small Websnap ISAPI app that has a webdatamodule with
an ADOconnection and a webpage with a ADOStoredproc which uses
the connection in the datamodule.

Everything works fine to start with, however after some hours I get a
connection error. Its like the connection to the database is lost..

Does anyone have any ideas of what may cause this?

Thanks!
Gunnar





Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet WebSnap All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.