Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 3 of 3 total |
Another NULL-problem |
Sun, Mar 16 2008 5:47 PM | Permanent Link |
Uli Becker | I want to assign a date value from an EDBTable to a DateTimePicker:
if not VarIsNull(MyTableMyDate.value) then DateTimePicker.date := MyTableMyDate.value; Surprisingly this results in an exception. Investigating further I found that MyTableMyDate.value = 0! Checking this in EDBManager shows, that the value is actually NULL. Any idea what is wrong here? Regards Uli |
Mon, Mar 17 2008 3:53 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Uli
>Investigating further I found that MyTableMyDate.value = 0! Checking this in EDBManager >shows, that the value is actually NULL. > >Any idea what is wrong here? The quick answer is nothing. Everything is working as it should - apart from your expectations There is a difference between sql and delphi with null's. eg a VARCHAR in sql may return null (currently at least) but if your access it through .AsString it returns an emptystring, for integers .AsInteger returns 0. What you need to do is rather than using VarIsNull(MyTableMyDate.value) as your check use MyTableMyDate.IsNull Roy Lambert |
Mon, Mar 17 2008 4:08 AM | Permanent Link |
Uli Becker | Roy,
> What you need to do is rather than using VarIsNull(MyTableMyDate.value) as your check use MyTableMyDate.IsNull Thanky, Roy. That helped. Regards Uli |
This web page was last updated on Tuesday, September 17, 2024 at 04:19 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |