Page 1 of 1

TUniQuery and OnCalcFields

Posted: Wed 07 Dec 2011 19:20
by lz2112
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.

Posted: Thu 08 Dec 2011 19:42
by lz2112
NM.

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

Posted: Fri 09 Dec 2011 11:51
by AlexP
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 .