RB 12.05 Null date values
Hi
I upgraded to RB 12.05 from 12.01 (Delphi 2007 U3).
I have a custom pipeline derived from TppJITPipeline to handle 1 row Jit
data (I have been using since RB7).
After I upgraded I have problems with null date values. I create a field
with type dtDateTime, and pass values thru OnGetFieldValue function
(with return type variant). When the date value is null I get a "cannot
convert variant type string to double". This was working in prior
releases (inc 12.01 and before)
Any ideas?
Bora Aydemir
I upgraded to RB 12.05 from 12.01 (Delphi 2007 U3).
I have a custom pipeline derived from TppJITPipeline to handle 1 row Jit
data (I have been using since RB7).
After I upgraded I have problems with null date values. I create a field
with type dtDateTime, and pass values thru OnGetFieldValue function
(with return type variant). When the date value is null I get a "cannot
convert variant type string to double". This was working in prior
releases (inc 12.01 and before)
Any ideas?
Bora Aydemir
This discussion has been closed.
Comments
I checked the version history and the JITPipeline has not been modified to
handle GetFieldValue differently. You might try adding RBuilder\Source to
the Delphi library path, then run under the debugger and when the exception
occurs examine the call stack.
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
field when the value is null. What would be the best way to send null
date values from Jitpipeline?
Bora
20/09/2011 18:26, Nard Moseley (Digital Metaphors) yazmis:
return Null.
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
to the result of the function, thus leaving the value unassigned. This
works with datetime fields but will this approach cause problems?
21/09/2011 19:16, Nard Moseley (Digital Metaphors) yazmis:
Correct, this is how TDateTime works - please see the Delphi help topic for
TDateTime. It is worth reading to understand the details.
If you don't return a value, then the value will be Null (see
TppJITPipeline.GetFieldValue method in ppDBJIT.pas). If that works, then
move forward and do further testing. I don't think that will cause an issue
with controls like DBText, DBCalc. Any code you write to read and process
the field value will have to check whether the value is null.
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com