Inserts null instead of 0000-00-00

Maybe a typical newbie question but any help is very welcome !

I want to build a new userinterface for an existing database. In this database the null vaues for dates have to be inserted as “0000-00-00” when the value is empty. I tried to set this value 0000-00-00 on validation and as default but whatever I try scriptcase keeps creating an insert statement with a null value for dates. How can I get scriptcase to insert the right value without having to change the database ?

Greetings

Roelof

I think that you have to set this value in the onbeforeinsert/update. The only problem you might encounter is the right format to make it happen. Will need a bit of fiddling.

Thanks for your advice. This did not work. Something very strange is happening here. When I raise a sc_alert my date is null. This is what SC tries to insert.
But when I test the date variable with is_null or empty or isset it is not true.

I got it working but in a very unusual way. I compared my null date variabele with another null date variable and then it did work. This code is in my onvalidation :

if({stop_date}=={processingdate}) {
{stop_date} =“0000-00-00”;
}

very very strange. maybe the SC developers could have a look at this.
Roelof