Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Behalf of a Friend...SQL 7 Dates and FoxPro
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00626954
Message ID:
00627376
Views:
18
Hi All,

In our application we are using our own technology and any select statement to SQL server is followed by replace statement for date fields, but for us is no problem to implement any date transformation because the data processing is separated.
So it can be done two things:
To write an insert and update triggers, which will catch empty dates and write nulls instead (if this is suitable for you)
- or -
to replace all SQLECEC statements with user defined program where after executing query all date fields with values less than 01.01.1900 will be blanked

In my opinion it will be easier to replace all SQLECEC with your own function, than writing new code on every place where you have data processing


>We are using FoxPro and SQL Server 2000. Unfortunately, we started using the foxpro base classes for adding,editing and deleting way back when.
>The problem is that when we clear a date field on a form and perform save, we end up with a blank on the server which displays as 1900/01/01. What's worse is that date calculations treat this a real date. Reset to null and it's ok. We tried different masks, default data types etc. We know we could rewrite all the add,change and delete code, but...
>
>Is there something we can do (a set of rules) on the server that say "if this value is blank as it comes in, change it to null". Or is there something about the SQL ODBC driver? HELP?
>
>Thanks
>
>Mike
Venelina Jordanova

Outsourcing IT Services Ltd.
Previous
Reply
Map
View

Click here to load this message in the networking platform