Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sql syntax?
Message
From
14/12/2006 17:30:33
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
14/12/2006 16:54:40
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01177802
Message ID:
01177818
Views:
19
>Hi Dragan,
>
>Thanks for the info. I needed to put ctod() on my StartDate and EndDate.

Generally, the fastest way to catch the causes of data type errors is to put a breakpoint at such a line (using right click menu), then look them up in the debugger. In VFP6 I think you need to scroll down in the locals window to see their values; in VFP8 and 9 you just hover the mouse over them in the trace window and the values show as tooltips (which saved me a lot of time). Then you can see what's wrong. Unfortunately, there was a design decision in VFP9 to stop showing strings as enclosed in quotation marks, so you can't really distinguish a date string from a date. They do show in watch and locals windows properly - you can just drag the variable's name from the trace window to watch window (not sure it would work in VFP6 - you may copy and paste its name, though).

Another thing - you'd be better off by having real date values in those variables, because your users may have different set("date") than you. If these values are coming from textboxes where users enter values, initialize their values as dates (use {} for empty), and then VFP will also help you validate them automatically. It won't allow 30th of February, it will default to current year if user enters only month and day etc.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform