Subject readonly fields in row reported differently between IBX & IBO
Author nick
Hi,

I'm attempting to port some code from IBX (version 5.04 connected to a Firebird
1.5.2 server) which was originally based on the replication model by Matt
Hopkins, Dunstan Thomas (UK) Ltd. here
http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_howto10 - which
dynamically builds an insert, edit or delete statement for the table the data
comes from.

I had previously modified this to identify computed columns, to skip them from
the sql generated and did so using the readonly property:

example:
if RowExists then begin //update sql
with sql do begin
add('update ' + strTableName);
add('set');
for i := 0 to qrySource.fieldCount-1 do begin //list all columns as params
if not qrySource.Fields[i].ReadOnly then //trap any calculated at server
add(' ' + qrySource.Fields[i].FieldName +
' = :' + qrySource.Fields[i].FieldName + ',')
end;
sql[count - 1] := copy(sql[count - 1], 1, length(sql[count - 1]) - 1);
//remove comma after

add(' where (' + strKeyField + ' = ''' + iKey + ''');');
end;
prepare;
for i := 0 to qrySource.fieldCount-1 do begin //populate params
if qrySource.Fields[i].ReadOnly then
inc(ParamOffset)
else
qryTarget.Params[i - ParamOffset].Value := qrySource.Fields[i].Value;
end;
execSQL; //run it
end


however changing qrySource from a to a TIBQuery to a TIBOQuery (or TIB_Query or
a TIBOTable) the readonly property doesn't behave in the same way - and on a
table with computed columns readonly (or computed) is never true.

Is there something I'm not preparing/setting, or am I miss using this property -
and if so, what component and properties can I use that would give me this
information?

thanks in advance,

nick