[DUG] Object was open
edwardh at slingshot.co.nz
edwardh at slingshot.co.nz
Wed Feb 23 16:58:07 NZDT 2011
Thanks for the suggestion.
I'm using TADOQuery, and have nothing to do with TClientDataSet, so what John
suggested doesn't apply to me at all.
I do expect that it's Windows Update related, but I can't pinpoint which one.
I have confirmed that the same application works on my another Win2003 server,
when connected to the same database. So it's definately something to do with
the server. What I need to know is "what" caused it. Unfortunately, I can't
change/swap the server.
I don't think rollback transaction before start is a valid option, as
ADOConnection would simply fail it.
Edward
Quoting Rohit Gupta <rohit at cfl.co.nz>:
> Edward,
>
> I have something similar at only one site. They get transaction already
> started error. And only they do. I have gone through the code several
> times - every query is try/finally and try/except bracketed and all
> transaction starts/commits/rollbacks are correct.
>
> It just occurs to me that if the sql server uses tcpip (which firebird
> does and I am using firebird) then it could be windows dropping the
> tcpip transactions. I know it is stupid in many other situations where
> it clears the stack. I suppose this could also happen due to window
> updates.
>
> As John says, closing the query prior to use may be the answer. I dont
> like the idea myself, but I may have to do rollback before start :-(
>
>
>
>
> On 21/02/2011 8:54 p.m., Edward Huang wrote:
>> Hi,
>> I'm having a strange error recently. We have a program that has
>> been running on a Win2003 server for a long time, and suddenly from
>> last week it comes up 'Object was open' errors.
>> Typically, the program uses 2 TADOQuery, one will select/Edit/Post,
>> another one with an 'Insert into xxx' query, both pointing to a same
>> SQL Server 2005 table. The pattern appears on many places.
>> Disregard the nicety of the logic, it has been done that way for
>> over 5 years, first on Win 2000 server with SQL Server 2000, and
>> later on Win 2003 server with SQL Server 2005, and was all fine,
>> until about a week ago.
>> I have tried Google, but couldn't really find any useful link to my
>> situation, although there are lots of link to the same error. I'm
>> suspecting some kind of OS patch or such which changed behaviour of
>> ADO or MDAC or SQL Server.
>> Anyone has a suggestion to my situation? I'm not keen on changing
>> all the code to use different logic, as it would require fair amount
>> of coding and testing.
>> Thanks,
>> Edward
>>
>>
>> __________ Information from ESET NOD32 Antivirus, version of virus
>> signature database 5891 (20110220) __________
>>
>> The message was checked by ESET NOD32 Antivirus.
>>
>> http://www.eset.com
>>
>>
>> _______________________________________________
>> NZ Borland Developers Group - Delphi mailing list
>> Post: delphi at delphi.org.nz
>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>> Unsubscribe: send an email to delphi-request at delphi.org.nz with
>> Subject: unsubscribe
>>
>>
>> __________ Information from ESET NOD32 Antivirus, version of virus
>> signature database 5891 (20110220) __________
>>
>> The message was checked by ESET NOD32 Antivirus.
>>
>> http://www.eset.com
>>
>
>
> --
> Regards
>
> *Rohit Gupta*
> B.E. Elec., M.E., Mem IEEE, Mem IET
> Technical Director
> Computer Fanatics Ltd
>
> *Tel *4892280
> *Fax *4892290
> *Web *www.cfl.co.nz
> ------------------------------------------------------------------------
> This email and any attachments contain information, which is
> confidential and may be subject to legal privilege and copyright. If you
> are not the intended recipient, you must not use, distribute or copy
> this email or attachments. If you have received this in error, please
> notify us immediately by return email and then delete this email and any
> attachments.
More information about the Delphi
mailing list