Subject RE: [IBO] Field cannot be modified exception
Author IBO Support List
Sorry I overlooked this issue until now.

Perhaps you should send me a little sample app to look at?

Have you told IBO the KeyRelation that the insert is to be based on?

Thanks,
Jason

-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf
Of sboydlns
Sent: 05 January 2012 03:25 PM
To: IBObjects@yahoogroups.com
Subject: [IBO] Field cannot be modified exception

I am using IBO 4.9.14 with Delphi XE2.

I am using a TIBOQuery whose SQL statement is a select with a left join. I
am trying to update this query by setting RequestLive := True and providing
values for EditSQL, InsertSQL and DeleteSQL.

The SELECT looks like this:

SELECT ET_NAME, EQUIPMENT.*
FROM EQUIPMENT
LEFT JOIN EQUIP_TYPES ON ET_ID = E_TYPE
ORDER BY LOWER(ET_NAME), LOWER(E_MAKE)

If I provide an UPDATE statement for EditSQL and leave InsertSQL blank, I
can update the query by providing values for ET_NAME and the other fields
from the equipment table. I have a BeforePost event on the query that
translates the new ET_NAME value to the corresponding E_TYPE value.

As soon as I provide a value for InsertSQL, the ET_NAME field becomes
unmodifiable. That is, the ReadOnly property gets set to True. If
InsertSQL is left blank, this does not happen.

How can I fix this?




------------------------------------

___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
Yahoo! Groups Links