Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date fields on SQL-Server
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00459116
Message ID:
00459133
Views:
29
I know that you can use the DBSETPROP() function on a remote view to have VFP treat a SQL Server DateTime field like a Date field:

DBSETPROP("RemoteView.FieldName", "field", "DataType", "Date")

You may also be able to use CURSORSETPROP() in a similar manner.

>Does anyone have a suggestion on how to handle date (as opposed to date-time) fields on SQL-server, using SQL-pass-through?
>
>I am writing some back-end interface routines. I want to give the application program a cursor with a true date fields rather than a date-time... mainly for compatability with existing code and with VFP data bases.
>
>I can't do an ALTER TABLE (to fix up those fields) on a cursor created with SQL pass-through. And if I try to create a second cursor from that (using another SQL select, say), I can't connect it back to my SQL-server data base. I suppose I could possibly scan this second cursor for changes manually and create the SQL Updates in code, but that seems like it could be slow.
>
>If SQL-server doesn't have date fields, does ODBC? Another crazy idea: Is there a way to define date fields in SQL server as user defined data types? But then, how can I get it back into my application as a date?
Chris McCandless
Red Sky Software
Previous
Reply
Map
View

Click here to load this message in the networking platform