Article View: borland.public.cppbuilder.database.ado
Article #4990Re: Object was open
From: Arnie Mauer
Date: Thu, 16 Aug 2001 18:20
Date: Thu, 16 Aug 2001 18:20
55 lines
3156 bytes
3156 bytes
Nice to know I'm not alone! I have a very different app setup but get
the same error. Using an Oracle 8i server.
We have a lot of "support" functions that are usually passed a TADOQuery *
as
one of their parameters for general use. Typically, they start:
int __fastcall MyFunc( TADOQuery * q, char * aValue )
{
q->Close();
q->SQL->Clear();
q->SQL->Add( "SELECT blah blah" );
q->Open();
...
return SomeResult;
}
There are a LOT of these executed during operation, but only certain ones
throw the "Object was open" exception on the Open(). What's worse, it
will happen reliably at the same point when the app is run outside the BCB 5
IDE but won't occur at all when run in the IDE.
The place the error occurs can be found in include\atl\atldb.h. Search
for DB_E_OBJECTOPEN Of course this only the template. Any
ATL/OLEDB experts out there?
- Arnie
"Hans Martin Br�ckmann" <HMB@brueckmann-gmbh.de> wrote in message
news:3B714326.D1F6607F@brueckmann-gmbh.de...
> Hi there,
>
> I use MDAC 2.6 + SP and BCB 5.0 E with the latest SP�s. I have 2 unbound
> Master/Detail tables, which are controlled by InfoPowers 2000
> Comboboxes. The ADODataSets maste/detail sync. is managed by a
> DataSource bound to the master and the detail�s SQL expression is
> parameterized. Everything is fine as long as I navigate through the
> comboboxes. But if I try to move to another record by calling
> tblDetail->Locate(....) and then again start to navigate the master
> table by accessing the combobox, the error "Object was open" occures.
> Afterwards the client table is closed. I reasured that when I move
> through the parameterized detail -table that i move insde the master
> given parameter value range. Even if I try to Locate a record which is
> out of this range, the Problem occures.
>
> I investigated this problem now for several days and did search the
> newsgroups but I didn't get any satisfying solution. Neither the client
> nor the master table�s ExecuteOptions are set to any of these
> async-switches. The tables are closed at design-time and opened at
> runtime. I am sure that this has nothing to do with infopower - it seems
> that it is an ADO problem.
>
> Thanks for help in advance
>
Technical Details
Message-ID:
<3b7c0f03_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnewsReferences:
<3B714326.D1F6607F@brueckmann-gmbh.de>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10698b,88b78f66967d3651 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-08-16 11:32:52 PST From: "Arnie Mauer" <arnie@vrms.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3B714326.D1F6607F@brueckmann-gmbh.de> Subject: Re: Object was open Date: Thu, 16 Aug 2001 14:20:51 -0400 Lines: 57 Organization: VRMS X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 NNTP-Posting-Host: 209.140.211.97 Message-ID: <3b7c0f03_2@dnews> X-Trace: dnews 997986051 209.140.211.97 (16 Aug 2001 11:20:51 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews