Date From A DataBase

Eyal

New member
Joined
Aug 16, 2003
Messages
1
I Know The Answer Is Probably Something very Easy But Ill Ask Anyway:

I Am Upgrading A Project Which Have A Field Of Type Date
And Some Of The Records R Null In It.
When I Try To Bind The Date Field To A DateTimePicker It Thorws Me An Error Because The DateTimePicker Cant Get Null As A Value.

I Am Trying To Make The DateTimePicker Get The Null Value And Show An Empty Text And That It Will Return A Null If The Text Is Empty.

I Hope Somebody Can Tell Me A Way To Do This
Thank U
 
If youre using binding, youll have to implement the Format and Parse events. The Format will have to convert the System.DBNull.Value to an empty string (or whatever the DateTime picker wants for a blank value). The Parse will have to convert the empty string to System.DBNull.Value.

-Ner
 
Back
Top