<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Edward,<br>
<br>
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.<br>
<br>
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.<br>
<br>
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 :-(<br>
<br>
<br>
<br>
<br>
On 21/02/2011 8:54 p.m., Edward Huang wrote:
<blockquote cite="mid:5DF47073FA964F87B8747EE62A67644B@Laptop"
type="cite">
<title>[DUG] Rhino Mocks</title>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<meta name="GENERATOR" content="MSHTML 8.00.6001.18999">
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"
size="2"><span class="248354407-21022011">Hi,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"
size="2"><span class="248354407-21022011"></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"
size="2"><span class="248354407-21022011">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.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"
size="2"><span class="248354407-21022011"></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"
size="2"><span class="248354407-21022011">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.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"
size="2"><span class="248354407-21022011"></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"
size="2"><span class="248354407-21022011">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.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"
size="2"><span class="248354407-21022011"></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"
size="2"><span class="248354407-21022011">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.</span></font><font
color="#0000ff" face="Arial" size="2"><span
class="248354407-21022011"> I'm suspecting some kind of OS
patch or such which changed behaviour of ADO or MDAC or SQL
Server.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"
size="2"><span class="248354407-21022011"></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"
size="2"><span class="248354407-21022011">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.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"
size="2"><span class="248354407-21022011"></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"
size="2"><span class="248354407-21022011">Thanks,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"
size="2"><span class="248354407-21022011"></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"
size="2"><span class="248354407-21022011">Edward</span></font></div>
<br>
<br>
__________ Information from ESET NOD32 Antivirus, version of virus
signature database 5891 (20110220) __________<br>
<br>
The message was checked by ESET NOD32 Antivirus.<br>
<br>
<a moz-do-not-send="true" href="http://www.eset.com">http://www.eset.com</a><br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: <a class="moz-txt-link-abbreviated" href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a>
Admin: <a class="moz-txt-link-freetext" href="http://delphi.org.nz/mailman/listinfo/delphi">http://delphi.org.nz/mailman/listinfo/delphi</a>
Unsubscribe: send an email to <a class="moz-txt-link-abbreviated" href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject: unsubscribe
__________ Information from ESET NOD32 Antivirus, version of virus signature database 5891 (20110220) __________
The message was checked by ESET NOD32 Antivirus.
<a class="moz-txt-link-freetext" href="http://www.eset.com">http://www.eset.com</a>
</pre>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
Regards<br>
<br>
<b>Rohit Gupta</b><br>
B.E. Elec., M.E., Mem IEEE, Mem IET<br>
Technical Director<br>
Computer Fanatics Ltd<br>
<br>
<b>Tel </b>4892280 <br>
<b>Fax </b>4892290 <br>
<b>Web </b><a href="www.cfl.co.nz">www.cfl.co.nz</a><br>
<hr>
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.</div>
</body>
</html>