Subject [IBO] Re: Field trimming
Author Ed Dressel
I've been working on this for a few hours and finally figured out what
the issue was--if a param and a field have the same value, the SQL
will not work. Here is my code for writing a value that could be
trimmed to the database (CreateDSQL is define below but basically just
is a helper function for create a TIB_DSQL):

ldsql: TIB_DSQL;
begin
ldsql := CreateDSQL(aTx,
'Insert into [Table] (Some_ID, Other_ID, StrValue) '#13+
'values (1, 1, :StrValue)');
try
ldsql.FieldsTrimming.Add('StrValue=N');
ldsql.Prepare;
ldsql.Params[0].AsString := lData;
ldsql.ExecSQL;
finally
ldsql.Free;
end;

I had to change the param to StrValue2 and add it to the
FieldsTrimming list and it worked.

Is this a bug or just a 'way it works' item? (I often use the same
param name as a field name).

No mater what I've done, I can not get this to work without changing
the TIBO_Database.DefaultNoTrimming to True