Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I display sqlserver date 1/1/1900 as empty?
Message
De
28/07/2002 18:33:18
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00683384
Message ID:
00683390
Vues:
26
Sergey,

I have not yet tried to create an index on my views with the datetime field as part of the index. What happens in an index expression such as index on clineitem + ttoc(dreserve), when dreserve is null?

Also, I was able to get it to work with this expression in the column control source:

(iif(emptysqldate(v_sorsdt_all.dreserve),dummy.disempty,v_sorsdt_all.dreserve)))

where dummy is a cursor with one row and an empty date)
and the column is readonly

I have noticed that vfp always wants the control source to evaluate to a variable expression, if i put '' in place of dummy.disempty, it complains

Also, I really don't understand the behaviour, but I think I need parens around the control source to get this to work, and, if I am not mistaken, I need to 'arrow down' on this, rather than hit enter, when in design - not sure on this???







>I would suggest that you store empty dates as Nulls. It'll resolve your problems.
>
>>I am using backend sqlserver tables with datetime fields. I have set the default values for the datetime fields to be blank using (''), not to NULL. (I am not sure this was the best decision?)
>>
>>SQL Server stores 'blank' dates as 01/01/1900 plus the time portion.
>>I have a read only grid that displays these dates. How can I show them as empty? I guess I could change my remote view to have an additional field for the date that uses an expression to convert it to a blank string - although I don't know transact-sql that well, compared to vfp, to know what that expression would be.
>>
>>Ideally I would like to be able to have some kind of function or property of the text box in the grid that allows me to reformat it. Something like:
>>
>>a property of 'displaystring'
>>with a value of =mycustomstringformat()
>>and the mycustomstringformat function manipulates the string and returns it for display.
>>
>>I am wondering if I can replace the text object in the grid with a label, and manipulate the value property of the label?
>>
>>Any suggestions would be appreciated
>>
>>TIA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform