Thanks, Razzak.
Yes, I did notice and, as I said, I copied & pasted your code - no changes
whatsoever - into a command file which I then ran to create the table.
I have since created a new database and created the same table the same way
in that which gives me the same end result.
I will see if I can write up the _exact_ keystrokes that I am doing and then
send the db to RDCC with the explanation.
Actually, it was with a form that I first noticed the problem. I went back
to the data designer to ensure that it was correct there first before I
tried the form again. It was in subsequent testing in the browser that I got
the problem. In theory, the defaults should never be used - they are set at
01/01/1900 to indicate something is wrong - but when I tried to add the
expression and tested I then found the defaults on the two other fields were
not working correctly. I am fairly sure that the expression problem was
caused by having had a default for that column beforehand which I did not
clear when I added the expression and, since clearing the default, that part
of the problem is solved.
Regards,
Alastair.
----- Original Message -----
From: "A. Razzak Memon" <[EMAIL PROTECTED]>
To: "RBG7-L Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, August 13, 2004 8:25 AM
Subject: [RBG7-L] - Re: Data Designer Default Dates
> At 07:54 AM 8/13/2004 +0100, Alastair Burr wrote:
>
> >I copied & pasted your code, Razzak.
> >
> >As I was trying to explain before the table is created but the quotes
around
> >the default dates are lost when you subsequently look at the entries in
the
> >data designer. Yesterday, without those quotes in place, I could not get
a
> >default value entered.
>
> Alastair,
>
> If you noticed, in my example of CREATE TABLE ..., I didn't use single
quotes
> around the default dates.
>
> For curiosity's sake - what happens if you design a form based on that
> table and use ENTER USING FormName. Do you see those defaults in the form?
>
> Very Best R:egards,
>
> Razzak.
>
> P.S. I hope you are using the latest update and/or pre-release version.
>
>
>
> ----- Original Message -----
> >From: "A. Razzak Memon" <[EMAIL PROTECTED]>
> >To: "RBG7-L Mailing List" <[EMAIL PROTECTED]>
> >Sent: Friday, August 13, 2004 12:45 AM
> >Subject: [RBG7-L] - Re: Data Designer Default Dates
> >
> > > Try the following code to create a new table and
> > > see what you get:
> > >
> > > -- start
> > > SET ERROR MESSAGE 2038 OFF
> > > DROP TAB ToTeachADB
> > > CREATE TABLE `ToTeachADB` +
> > > (`ReleaseDate` DATE DEFAULT 01/01/1900 NOT NULL +
> > > ('Value for column ReleaseDate cannot be null'), +
> > > `Entry_Date` DATE DEFAULT 01/01/1900 NOT NULL +
> > > ('Value for column Entry_Date cannot be null'), +
> > > `Up_Date`=(IFNULL(Up_Date,.#DATE,Up_Date)) DATE)
> > > SET ERROR MESSAGE 2038 ON
> > > RETURN
> > > -- end
> > >
> > > I used the exact same default values as well as
> > > the expression using Database Designer without
> > > any problem!
> > >
> > > Very Best R:egards,
> > >
> > > Razzak.
>