General information
Category:
Coding, syntax & commands
SET CENTURY is scoped to the current data session. If you are using private datasession (as I guess you are), you must initialize the SET CENTURY (and other scoped settings) when the form start up. Probably the best place to put this is in the Load event of the form.
>I know this sounds strange, but I started to wander if there's anything like implicit 'set century on/off'. I have to modify somebody else's app in VFP 3.0b to ensure Y2K compliancy.
>
>I made the initial CENTURY setting to ON in main prg. However, when a particular form is started from a menu, CENT is switchced to OFF. The form itself is subclassed - I've checked form's every method and property and its ascendant's every method and property and could find any SET CENT command. I even string-searched the whole directory (and subdirectories) for 'set cent' - nothing was found.
>
>I was also running a program from Trace window and with SET("CENT") in Debug window, but immediately after DO FORM line is executed, century would change to OFF and then Trace window would start going through the code from the form events. Interestingly, century goes couple of times on and off before the form is fully displayed. When I exit the form, century againg goes on and off and then it's finaly (and politely) restored back to ON.
>
>In form's data environment, there's no code whatsoever and I've placed a message in DataEnvironment.BeforeOpenTables telling me the current setting of century. If I'm not mistaken, that's the very first event that's supposed to happen when the form is run. It shows me that century is OFF, already. I can easily override the setting by putting set cent on in, say, ascendants load event or so, but this remains a big puzzlement for me. Pease help. TIA,
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only