TUniQuery and OnCalcFields

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
lz2112
Posts: 2
Joined: Wed 07 Dec 2011 19:09

TUniQuery and OnCalcFields

Post by lz2112 » Wed 07 Dec 2011 19:20

I'm porting an old app the used ADOQuerys connecting to an Oracle database. I've replaced the tADOQuery components with tUniQuery components and all works fine. Except, when an OnCalcFields event fires I get a 'Database not in insert or edit mode' exception (ADO queries did not require the data set to be in an edit state). Attempting to call the UniQuery.Edit method gives an access violation.

What is the proper way to use the OnCalcFields event of a tUniQuery?

Thanks.

lz2112
Posts: 2
Joined: Wed 07 Dec 2011 19:09

Post by lz2112 » Thu 08 Dec 2011 19:42

NM.

Was caused by duplicate field names that for some reason ADO had never choked on.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Fri 09 Dec 2011 11:51

Hello,

We need your sample demonstrating the problem to reproduce it. Please send an example and script for creating and filling tables to alexp*devart*com .

Post Reply