Page 1 of 1
Error -605 *** Value Null ***
Posted: 11.09.2012, 15:40
by sfxcc
ENDDATE is date and was created after the table being created and it allows nulls so it filled the colum with nulls automatic.
So i want to set ENDDATE then i do :
UPDATE MYTABLE
SET ENDDATE=CURRENT_DATE
WHERE MYID=1
Error -605 ???? ****value null****
This wasnt supposed to happen ? It should Set RowID MYID primarykey ENDDATE with th CURRENT_DATE .The problem yet is in the IBOConsole if i change it manualy it accepts it with no problem only Query and Zeos Problem with zeos does an error ? Querrinmg it With Update on IBO Error Tooo but on the IBO Grid doesnt.
I dont undestand wheres the problem.
Posted: 13.09.2012, 10:24
by EgonHugeist
sfxcc,
are you sure this exeution fails?
Is it possible that your statement looks like:
Code: Select all
UPDATE MYTABLE
SET ENDDATE=:CURRENT_DATE
WHERE MYID=1
In this case does the TZSQLQuery handle the function CURRENT_DATE as Parameter 'CURRENT_DATE' and if no value is assigned we prepare a NULL value on executing the statment.
On the other hand: No idea. Can you make a bugtemplate to reproduce this issue?
Posted: 03.11.2012, 12:00
by sfxcc
This only fails if we alter a table add a new column with null if we create new rows with null i works fine but it is a firebird way to work, so after we alter and set the new column to null we must change the value and then set it to null again.
Posted: 03.11.2012, 18:30
by marsupilami
Hello sfxcc,
maybe it helps to use the date literal 'TODAY'? See
http://www.firebirdsql.org/en/firebird-date-literals/
So your query would look like this:
UPDATE MYTABLE
SET ENDDATE='TODAY'
WHERE MYID=1
What you say about altering the value of columns multiple times to get them right seems odd to me?
Posted: 03.11.2012, 18:33
by sfxcc
Yes is odd to me too but i spoke with firebird team and they said is like that.
so i solved the problem so im developing yet so i deleted all data from table and inserted again. Prob solved.
Posted: 04.11.2012, 19:42
by EgonHugeist
sfxcc,
if guess Jan is rigtht. But i wanted to find out if Zeos makes trouble here. And i think this is the case but absolutely expected behavior.
Simply switch of ParamChecks of your Component like TZQuery.ParamsCheck := False;
If this is set Zeos doesn't assume :CURRENT_DATE is a Parameter with name 'CURRENT_DATE'. Zeos will execute the query like you expect it.
Btw. This is a common behavior for all SQL Database Components.