🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #1741

Problems reconnecting to SQL server

#1741
From: Steve Aletto
Date: Mon, 16 Feb 2004 08:54
20 lines
1740 bytes
Hi all,

I'm developing an application that connects to a SQL server database. This
application uses a TADOQuery to execute some SQL statements (SELECT, UPDATE,
INSERT) periodically, let's say every 3 seconds. The application runs an a
client PC connected to the server through LAN and under normal conditions
there aren't problems.

If I turn off the server PC (where the database is located) obviously either
ExecSQL() and Open() methods fail and correctly throw an exception. The
problem arises when I turn on the server PC: the ExecSQL() method (used for
UPDATE and INSERT) returns to work, instead Open() (SELECT) still throws the
exception "Connection error". At this point the ConnectionString is still
correct.

Does anyone have any hint to solve the problem?

Thank you,

Steve.
Technical Details
Message-ID: <40308545@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,28dbce417f3e3202,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2004-02-16 01:09:32 PST
Reply-To: "Steve Aletto" <steve_alettoNOSPAM@THANKShotmail.com>
From: "Steve Aletto" <steve_alettoNOSPAM@THANKShotmail.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Problems reconnecting to SQL server
Date: Mon, 16 Feb 2004 09:54:45 +0100
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 80.105.101.132
Message-ID: <40308545@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1076921669 80.105.101.132 (16 Feb 2004 00:54:29 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail