Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I update date_field...
Message
 
To
14/12/1999 18:58:45
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00303757
Message ID:
00303785
Views:
11
>While running VFP Update-SQL with VFP database on back-end (server) in order to replace a date_type field with an empty date CTOD("//") I receive an error message. How to do it correctly? May be I need to find a workaround?
>TIA

Ed,

What error message do you receive, is it "Ambiguous date reference"? If it is then you have two choices, one good the other not so good. The good one first;

REPLACE DateField WITH {} && Those are curly braces the date delimiters

The not so good one is;

SET STRICTDATE TO 0 && in the start up prg and the Load of all forms

This one is not so good because the error message you are getting is really a warning that you have a date reference that can change value on you without you knowing it. For example;
SET DATE AMERICAN
?CMONTH(CTOD("01/12/1999")) && shows January

SET DATE BRITISH
?CMNONTH(CTOD("01/12/1999") && Shows ...
Well actually I can't tell what those outputs would be because they depend on the SET DATE setting at the time the code is compiled. The runtime setting has no effect on date literals. The date literals are changed into VFP's internal date format when teh code is compiled.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform