Eyal Posted August 17, 2003 Posted August 17, 2003 I Know The Answer Is Probably Something very Easy But I'll 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 Can't 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 Quote
Datahighway Posted September 3, 2003 Posted September 3, 2003 Try it with the Function IsDBNull() For More Details see the Framework Docu. Regards DataHighway Quote
*Experts* Nerseus Posted September 3, 2003 *Experts* Posted September 3, 2003 If you're using binding, you'll 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 Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.