Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General Discussion » View Thread |
Messages 1 to 3 of 3 total |
DateTime Field |
Tue, Oct 3 2006 3:05 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Most field types I can set to null which has the same effect (I think) as .Clear
DateTime fields I get an error - can't convert null to double As part of my mail and newsreader I need to convert text to date and time but when the header is malformed (probably deliberately by spammers) my conversion routine returns a null which generates an error. My function returns a TDateTime. What, other than setting it to zero, can I do? Roy Lambert |
Tue, Oct 3 2006 10:17 AM | Permanent Link |
"Scott Martin" | Roy,
I use: FieldByName(FieldName).Clear; to clear any type of field and I get no errors. Using DBi (set field to null simply) calls this to clear the field of any type. perhaps an sql call? update tablename set fieldname = null where conditionfield = value What is your code? Regards, Scott. "Roy Lambert" <roy.lambert@skynet.co.uk> wrote in message news:988A9D37-130C-4EC7-B0E1-E78FE48FECB2@news.elevatesoft.com... > Most field types I can set to null which has the same effect (I think) as .Clear > > DateTime fields I get an error - can't convert null to double > > As part of my mail and newsreader I need to convert text to date and time but when the header is malformed (probably > deliberately by spammers) my conversion routine returns a null which generates an error. My function returns a > TDateTime. What, other than setting it to zero, can I do? > > Roy Lambert |
Tue, Oct 3 2006 12:33 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Scott
Its of the nature tableFIELD.AsDateTime := ConvertToGMT(Date_As_Text_From_EMail) All the error trapping of the conversion is done in the conversion routine but it looks as though I'll have to wrap all the assignments in a try .. except block. Roy Lambert |
This web page was last updated on Friday, April 26, 2024 at 06:09 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |