Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change between VFP 6 and 9 -- DateTime and Date
Message
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 9
Database:
MS SQL Server
Miscellaneous
Thread ID:
01048077
Message ID:
01048115
Views:
37
>We are migrating an app from VFP 6 to VFP 9 and running into a behavior I don't understand. This one particular program blows up doing a comparison between a DateTime field in a SQL Server database and a memvar of type Date. It worked fine in VFP 6. I have poked around in the help looking at What's New, various topics about data types, and about SQL Server. Does anyone know? What I am really hoping to find is a VFP setting I can set application wide that will take care of this. Having to find and fix all problems like this in the app would be time consuming. (Finding all commands where a DateTime field is compared to a Date memvar -- how the heck do you do THAT other than checking every usage of every DateTime field? Yuck).

Mike,

I don't get the error in VFP9 in the simple test below or with a remote view. What could be different on your side?
CREATE CURSOR Test (dt t NULL)
INSERT INTO Test VALUES(DATE())
lcDate = DATE()
? dt = lcDate 
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform