I'm using sql query as follow:
update myTable set d_1=current_date, d_mod = current_timestamp, zapos = :zapos, MyMemo = (MyMemo || :TextToAdd) where nr = :nr
:zapos(VARCHAR[15])='Odbiór osobisty'
:TextToAdd(VARCHAR[27])='Towar odebrał: XXXX'
:nr(VARCHAR[10])='24899/09'
-----
It raise my application error like this
-- 2009-07-20 14:04:46:296 --
Error:
Dynamic SQL Error
SQL error code = -303
arithmetic exception, numeric overflow, or string truncation
-----
The same query with same parametres pasted in the IBExpert working fine.
I'm using IBDAC 3.0.0.3 --> TIBCQuery
Database is Firebird 2.1
MyMemo field is Varchar(4000)
I can't understand, what is wrong. Can anyone help me?
Mariusz
Right update sql failed
Re: Right update sql failed
Odbiór osobisty' string has special character but 'Yogi Bear'
does not so it works even with wrong charset.
"arithmetic exception, numeric overflow, or string truncation" error message usually indicates wrong charset or that you try to post too long string or a char to a numeric field.
does not so it works even with wrong charset.
"arithmetic exception, numeric overflow, or string truncation" error message usually indicates wrong charset or that you try to post too long string or a char to a numeric field.
This my delphi code:
tmp.SQL.text := 'update MyTable set MyMemo= :MyTextToAdd where nr=:nr';
tmp.ParamByName('MyTextToAdd').Text := 'ążśźćęłĄŻŚŹĆĘŁóÓ';
tmp.ParamByName('nr').Text := '6650/09/H';
tmp.ExecSQL;
This is IBCSQLMonitor's log:
-- 2009-07-22 13:52:47:046 --
update MyTable set MyMemo= :MyTextToAdd where nr=:nr
:MyTextToAdd(VARCHAR[16])='ążśźćęłĄŻŚŹĆĘŁóÓ'
:nr(VARCHAR[9])='6650/09/H'
-----
-- 2009-07-22 13:52:47:218 --
CommitRetaining:
-----
Has anyone any other idea?
tmp.SQL.text := 'update MyTable set MyMemo= :MyTextToAdd where nr=:nr';
tmp.ParamByName('MyTextToAdd').Text := 'ążśźćęłĄŻŚŹĆĘŁóÓ';
tmp.ParamByName('nr').Text := '6650/09/H';
tmp.ExecSQL;
This is IBCSQLMonitor's log:
-- 2009-07-22 13:52:47:046 --
update MyTable set MyMemo= :MyTextToAdd where nr=:nr
:MyTextToAdd(VARCHAR[16])='ążśźćęłĄŻŚŹĆĘŁóÓ'
:nr(VARCHAR[9])='6650/09/H'
-----
-- 2009-07-22 13:52:47:218 --
CommitRetaining:
-----
Has anyone any other idea?