Article View: borland.public.cppbuilder.database.ado
Article #1742Re: Problems reconnecting to SQL server
From: Viatcheslav V. Vassiliev
Date: Mon, 16 Feb 2004 11:39
Date: Mon, 16 Feb 2004 11:39
38 lines
2305 bytes
2305 bytes
Try add "OLE DB Services=-2" to your connection string. //------------------------------------------ Regards, Vassiliev V. V. http://www.managed-vcl.com - using .Net objects in Delphi for Win32 + ADO.Net http://www.oledbdirect.com - The fastest way to access MS SQL Server, MS Jet (Access) and Interbase (through OLEDB) "Steve Aletto" <steve_alettoNOSPAM@THANKShotmail.com> �������/�������� � �������� ���������: news:40308545@newsgroups.borland.com... > 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:
<4030abd6$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40308545@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10698b,28dbce417f3e3202 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2004-02-16 04:09:29 PST From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com> Newsgroups: borland.public.cppbuilder.database.ado References: <40308545@newsgroups.borland.com> Subject: Re: Problems reconnecting to SQL server Date: Mon, 16 Feb 2004 14:39:02 +0300 Lines: 40 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 213.234.218.42 Message-ID: <4030abd6$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1076931542 213.234.218.42 (16 Feb 2004 03:39:02 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail