Subject Re: Delphi6, Firebird 1.5 / Zeos - convert error
Author Svein Erling Tysvær
This just lists a lot of fields where you assign an integer to an
integer field. That is not likely to cause any error. A conversion
error sounds more like trying to put a letter into a numeric field or
using non-English characters without having set any character set.

Since you've given us very little information so far (I recommend that
you read "How to ask questions the smart way" in your native language:
http://www.catb.org/~esr/faqs/smart-questions.html#translations), I'll
just take a wild guess: Your problem is with the :docum_data
parameter. Why? Well, it is just a guess and it seems like a column
that may be referring to a character or blob field which are more
likely to cause problems ;o)

Set
-I like guessing

--- In firebird-support@yahoogroups.com, "giannifilippone" wrote:
> Martijn Tonies,
> thank you for replying,
> here my code, I get the error when executing ExecSql :
>
> -->>>>>
> procedure tform1.crea_batch;
> var kkk:integer;
> aaaa,mm,gg:word;
> begin
> yupdate.SQL.Clear;
> yupdate.SQL.Add('SELECT GEN_ID(GEN_bat_provvig_ID, 1) FROM
> RDB$DATABASE');
> yupdate.ExecSql;
> yupdate.active:=true;
>
> kkk:=yupdate.FieldByName('gen_id').AsINteger;
>
>
> with yupdate do begin
> SQL.Clear;
> SQL.Add('INSERT into bat_provvig ');
> SQL.Add('(kkk, ditta, amm, agente_mas, agente_par, docum_f_a,
> docum_aa, ');
> SQL.Add('docum_num, docum_data, tipo_movim, cliente_mas,
> cliente_par, pagamento, ');
> SQL.Add('netto_fattura, trasporto, zona_geog, q_deposito,
> provvigioni, ');
> SQL.Add('cod_spettanza, age2_mas, age2_par, scadenza_fatt,
> provvig_age2, tipo_ordine)');
> SQL.Add('values (:kkk, :ditta, :amm, ');
> SQL.Add(':agente_mas, :agente_par, :docum_f_a, :docum_aa, ');
> SQL.Add
> (':docum_num, :docum_data, :tipo_movim, :cliente_mas, :cliente_par, :p
> agamento, ');
> SQL.Add
> (':netto_fattura, :trasporto, :zona_geog, :q_deposito, :provvigioni, '
> );
> SQL.Add
> (':cod_spettanza, :age2_mas, :age2_par, :scadenza_fatt, :provvig_age2,
> :tipo_ordine)');
> ParambyName('kkk').AsInteger :=kkk;
> ParambyName('ditta').AsInteger :=yinput.fieldbyname
> ('ditta').asinteger;
> ParambyName('amm').AsInteger :=yinput.fieldbyname
> ('amministrazione').asinteger;
> .....
> .....
> ParambyName('tipo_ordine').Asinteger :=yinput.fieldbyname
> ('tipo_ordine').asinteger;
> ExecSQL;
> end;
> end;
>
> -----<<<<<
> The error messagge does not tell which field caused the exeption;
> kind regards,
> Gianni Filippini
>