Error -605 *** Value Null ***

Forum related to Firebird

Moderators: gto, cipto_kh, EgonHugeist

sfxcc
Senior Boarder
Senior Boarder
Posts: 95
Joined: 13.05.2010, 18:48

Error -605 *** Value Null ***

Postby sfxcc » 11.09.2012, 15:40

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.
where's the code ..

User avatar
EgonHugeist
Zeos Dev Team
Zeos Dev Team
Posts: 1739
Joined: 31.03.2011, 22:38

Postby EgonHugeist » 13.09.2012, 10:24

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?
King regards, Michael

You want to help? viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image

sfxcc
Senior Boarder
Senior Boarder
Posts: 95
Joined: 13.05.2010, 18:48

Postby sfxcc » 03.11.2012, 12:00

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.
where's the code ..

marsupilami
Gold Boarder
Gold Boarder
Posts: 671
Joined: 17.01.2011, 14:17

Postby marsupilami » 03.11.2012, 18:30

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?

sfxcc
Senior Boarder
Senior Boarder
Posts: 95
Joined: 13.05.2010, 18:48

Postby sfxcc » 03.11.2012, 18:33

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.
where's the code ..

User avatar
EgonHugeist
Zeos Dev Team
Zeos Dev Team
Posts: 1739
Joined: 31.03.2011, 22:38

Postby EgonHugeist » 04.11.2012, 19:42

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.
King regards, Michael

You want to help? viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image


Return to “Firebird”

Who is online

Users browsing this forum: No registered users and 1 guest