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.
Today, when I open the new table in the data designer it first asks me if I
want to add a null row. I answer Yes and a row is added with the defaults
correctly entered. Good.
Then when I press [F4] (if needed) then [F2] (actually using the icons but
it's supposed to be the same thing) to add a second row I get an empty row
with no defaults at all - all 3 values are null, presumably because the row
has not been added at that stage.
When I move the cursor out of the row, expecting the defaults to be entered,
I then get these error messages:
-ERROR- Invalid cursor state (2645)
-ERROR- The cursor [Value for column ReleaseDate cannot be null ] could not
be found ( 705)
These seem to then alternate until I kill R:Base.
Strangely, I can also see that the data has changed such that all six values
(2 rows of three columns) show 30/12/1899. I have take a screen image which
I can e-mail to you off-list if you want.
I'll carry trying to find out what's wrong...
Regards,
Alastair.
----- 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.