Date field contains ?????

I have just spent hours trying to track a bug in my application and it turns out this was being caused by a date conversion when a db date field contained the value ?????.

From my Progress experience this shouldn't be possible but I swear it's there. Absolutely no idea how it came about.

Does anyone have any ideas? My current suspicion is some db damage maybe although I can update the field manually and reset it to either a valid date or the unknown value ?. Once this has been done eveything appears normal again.
 
i don't follow, you're saying a db field cannot contain the unknown
value ? of course you know that isn't the case.

you're probably jumping the gun way, way to soon, if the db was
damaged fatal errors would show up everywhere.

it could effect block headers, indexes, any db structures, even
datatype structures, anyhow it probably won't just scramble values.

could be anything, format, conversion issues ? good luck !
 
What I'm saying is a data field in the db contains the value ????? (that is 5 ?), this is of course not to be confused with the unknown value ?.

I don't know how this occurred as to my knowledge you cannot programatically or manually assign ????? to a date field.

That's why I was wondering about db damage; although as you say errors would be coming up everywhere and this doesn't seem to be the case (at this stage anyway...).
 
hi chris,

there's no such thing, ????? or ? are the same i.e. an unknown value.

even if let's say the database was damaged, vars, buffers etc. have no such value.

again it could be format, conversion etc. issues ? e.g. display -1 format "99999" no-error.
 
hey joey

I know there is no such thing but I also know what I see...

The db field is defined as date 99/99/9999.

If I use a vanilla display statement (ie no formatting)
DISPLAY date-field
or even
MESSAGE date-field VIEW-AS ALERT-BOX,

the resulting display shows "?????"

I know this shouldn't be possible but it's there as plain as day...
 
shtrange ...

display does have a format it's implicit, inherited from the field. but a
message is unformatted.

in theory even a format "99/99/9999" won't display all possible values
e.g. 1/1/-5000.

what's the error number/message, and how about message int(
date_field ) view-as alert-box.

the database doesn't crash afterwards, right ?
 
Yeh tell me about it...

No, nothing crashes post display.

Sad to say I've reset the date field in the one record in question (so my application would run again) and of course I can't recreate it again as we all know ????? can't be assigned to a date field!

Have to put this down to one of them Progress gremlins...

Thanks for your input.
 
first off i'm not a dba, more like a script kiddie, maybe you should bring
it up dba@peg.com maybe even to someone on the db engine crew.

you could also search thru the knowledge base and the peg archives
and see if anything looks familiar.

the error could have also been logged in the database .lg file, worth a
shot. good luck !
 
it's not exactly an official quote, maybe there's something in the docs.

usually display fills the widget with "?" when an error occurs.
 
Sad to say I've reset the date field in the one record in question (so my application would run again) and of course I can't recreate it again as we all know ????? can't be assigned to a date field!

It's not a problem you can try again :)

Here's a sample.

Code:
DEFINE VARIABLE i AS INTEGER    NO-UNDO INIT 100000000.
MESSAGE PROGRAM-NAME(1) SKIP
   DATE(i)
   VIEW-AS ALERT-BOX INFO BUTTONS OK TITLE "DEBUG".
 
Back
Top