🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Problems reconnecting to SQL server

#1743
From: Steve Aletto
Date: Mon, 16 Feb 2004 13:10
28 lines
1852 bytes
> 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: <4030c139@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nx02.iad01.newshosting.com!newshosting.com!elnk-atl-nf1!newsfeed.earthlink.net!bigfeed2.bellsouth.net!bigfeed.bellsouth.net!news.bellsouth.net!peer01.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <40308545@newsgroups.borland.com> <4030abd6$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,28dbce417f3e3202
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2004-02-16 05:15:53 PST
Reply-To: "Steve Aletto" <steve_alettoNOSPAM@THANKShotmail.com>
From: "Steve Aletto" <steve_alettoNOSPAM@THANKShotmail.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <40308545@newsgroups.borland.com> <4030abd6$1@newsgroups.borland.com>
Subject: Re: Problems reconnecting to SQL server
Date: Mon, 16 Feb 2004 14:10:38 +0100
Lines: 30
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: <4030c139@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1076937017 80.105.101.132 (16 Feb 2004 05:10:17 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nx02.iad01.newshosting.com!newshosting.com!elnk-atl-nf1!newsfeed.earthlink.net!bigfeed2.bellsouth.net!bigfeed.bellsouth.net!news.bellsouth.net!peer01.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail