🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Problems reconnecting to SQL server

#1744
From: Viatcheslav V. Vassiliev
Date: Mon, 16 Feb 2004 13:20
50 lines
2442 bytes
"OLE DB Services=-2" should turn off connection pooling.

> Do you think is it a good and safe solution?
Yes if it works. When server was disconnected ADO can not connect back
itself and should be forced to reconnect.

//------------------------------------------
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:4030c139@newsgroups.borland.com...
> > Try add "OLE DB Services=-2" to your connection string.
>
> Hi Viatcheslav,
>
> unfortunately that doesn't solve the problem. What is it for?
>
> Anyway, I found a work-around for the moment, simply I set again the
> connection string if an exception is thrown and the next time I Open() I
can
> access the DB:
>
> try
> {
>     Q->Open();
> }
> catch (...)
> {
>     Q2->ConnectionString = "";
>     Q2->ConnectionString = TheConnectionString;
> }
> Q->Close();
>
> Do you think is it a good and safe solution? I'm not very sure, but I
don't
> understand the reconnection problem as well (by the way, all the SQL
> statements have the same problem, not only SELECTs as I told before).
>
> Thank you,
>
> Steve.
>
>
Technical Details
Message-ID: <4030c3b5@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-mail
References: <40308545@newsgroups.borland.com> <4030abd6$1@newsgroups.borland.com> <4030c139@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 05:39:58 PST
From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <40308545@newsgroups.borland.com> <4030abd6$1@newsgroups.borland.com> <4030c139@newsgroups.borland.com>
Subject: Re: Problems reconnecting to SQL server
Date: Mon, 16 Feb 2004 16:20:52 +0300
Lines: 52
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: <4030c3b5@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1076937653 213.234.218.42 (16 Feb 2004 05:20:53 -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