I'm writing a console app on Delphi2007 and Firebird2.5 and I got an error if I try to open a Query. At a specific row I got an exception that the resultset is not updateable.
But the example ZSimple works on the same table !?
I searched for the reason and found this:
the TZInterbase6DatabaseMetadata.UncachedGetColumns looks like:
Code: Select all
// COLUMN_SIZE.
case TypeName of
7, 8 : Result.UpdateInt(7, 0);
16 : Result.UpdateInt(7, GetInt(ColumnIndexes[9]));
37, 38: UpdateNull(7); //the defaults of the resultsets will be used if null
{if ( ConSettings.ClientCodePage.ID = 0 ) then //CharcterSet 'NONE'
Result.UpdateInt(7, GetFieldSize(SQLType, ConSettings,
GetInt(ColumnIndexes[10]), GetConnection.GetIZPlainDriver.ValidateCharEncoding(SubTypeName).CharWidth, nil, True)) //FireBird return Char*Bytes for Varchar
else
Result.UpdateInt(7, GetFieldSize(SQLType, ConSettings,
GetInt(ColumnIndexes[10]), ConSettings.ClientCodePage.CharWidth, nil, True)); //FireBird return Char*Bytes for Varchar}
else
Result.UpdateInt(7, GetInt(ColumnIndexes[10]));
end;
I think the right line must be:
Code: Select all
37, 38: Result.UpdateNull(7);