![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 3 of 3 total |
![]() |
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 ![]() | 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 Monday, July 15, 2024 at 07:03 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |