Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Handling nulls after upsize to SQL Server
Message
From
16/05/2001 05:26:15
 
 
To
15/05/2001 17:15:04
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00507561
Message ID:
00507714
Views:
12
This message has been marked as the solution to the initial question of the thread.
Hi!

Empty date is not a .NULL. value. It is specific value in VFP. SQL Server do not have such format for date, so all empty dates are replaced by the some predefined date. You can replace these dates by .NULL. values using simple UPDATE-SQL command sent to SQL Serevr:

UPDATE MyTable SET MyDate=null WHERE MyDate='01/01/1900'

In addition, field should allow nulls.

Than in VFP application you will require some changes to handle null dates.

Another solution is to change applciation logic so dates are never empty.

HTH.

>What are the best ways for handling null values after upsizing a database and then using remote views to access it? Specifically, I noticed that empty date fields which used to display as " / / ", are now "01/01/1900". Have I done something wrong (fairly likely, given my experience with SQL Server) or do I write code to handle this, or.....
>
>Thanks,
>Pat
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform