<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Marcos Douglas wrote / napĂsal(a):
<blockquote
cite="mid:CA+ixmebaKd7rFiaxRozwmDcv1CcQQDF_=EKVfDB1FjKhbgRbCA@mail.gmail.com"
type="cite">
<pre wrap="">On Thu, May 3, 2012 at 2:52 AM, LacaK <a class="moz-txt-link-rfc2396E" href="mailto:lacak@zoznam.sk"><lacak@zoznam.sk></a> wrote:
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">I saw the TBufDataSet.ApplyUpdates and it calls ApplyRecUpdate.
The ApplyRecUpdate just raises an exception...
</pre>
</blockquote>
<pre wrap="">Yes it is virtual method, which can be overriden by descendants
</pre>
<blockquote type="cite">
<pre wrap="">There is some implementation, in some place, to work with ApplyUpdates
(like a Delphi's TClientDataSet)?
</pre>
</blockquote>
<pre wrap="">Yes, see in sqldb.pp at TCustomSQLQuery
</pre>
</blockquote>
<pre wrap=""><!---->
Yeah... I did not know that the TCustomSQLQuery descended of TCustomBufDataSet.
Well, I tried to use ApplyUpdates with TSQLQuery and TMSSQLConnection
(SQLServer).
I put a DBGrid, DataSource... blablabla... I edited the record on the
Grid and click in Apply button (ApplyUpdates(0))
ERROR 20019:
"Attempt to initiate a new SQL Server operation with results pending."
On the internet I found this:
<a class="moz-txt-link-freetext" href="http://www.sybase.com.br/detail?id=897#1825">http://www.sybase.com.br/detail?id=897#1825</a>
I don't have other SGBD now to test so, I would like to know if this
is a problem in TMSSQLConnection or in ApplyUpdates?
</pre>
</blockquote>
Yes it is a known problem (also in ODBC), read also in
sqldb/mssql/readme.txt:<br>
- DB-Library error 10038 "Results Pending" - set
TSQLQuery.PacketRecords=-1 to fetch all pendings rows<br>
HTH<br>
-Laco.<br>
<br>
</body>
</html>