[fpc-pascal] TBufDataSet: ApplyUpdates

LacaK lacak at zoznam.sk
Thu May 3 15:01:07 CEST 2012


Marcos Douglas  wrote / napĂ­sal(a):
> On Thu, May 3, 2012 at 2:52 AM, LacaK <lacak at zoznam.sk> wrote:
>   
>>> I saw the TBufDataSet.ApplyUpdates and it calls ApplyRecUpdate.
>>> The ApplyRecUpdate just raises an exception...
>>>
>>>       
>> Yes it is virtual method, which can be overriden by descendants
>>
>>
>>     
>>> There is some implementation, in some place, to work with ApplyUpdates
>>> (like a Delphi's TClientDataSet)?
>>>
>>>       
>> Yes, see in sqldb.pp at TCustomSQLQuery
>>     
>
> 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:
> http://www.sybase.com.br/detail?id=897#1825
>
> 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?
>
>   
Yes it is a known problem (also in ODBC), read also in 
sqldb/mssql/readme.txt:
- DB-Library error 10038 "Results Pending" - set 
TSQLQuery.PacketRecords=-1 to fetch all pendings rows
HTH
-Laco.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20120503/2833b118/attachment.html>


More information about the fpc-pascal mailing list