![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
Hi Karl, Of cuz i set the NONULLSKIP. But it still failed. I doubt the error comes from the len_check function(adclenchk.c) |
#12
| |||
| |||
|
|
On Mar 19, 2009, at 3:46 AM, zhenchen17 wrote: Hi Karl, Of cuz i set the NONULLSKIP. But it still failed. I doubt the error comes from the len_check function(adclenchk.c) It depends on where adc_lenchk is being called. If it's being called with the second (adc_is_usr) parameter TRUE, then the supplied length should be the "user visible" length (8 in the float case), and the lenchk routine will adjust for the null indicator. If it's being called with adc_is_usr FALSE, which is more common, then the supplied length needs to be the true internal length and must be sizeof(f8)+1 for nullable. Upon looking through the user defined functions that we used at Datallegro, I see that the FI's do indeed have the true length set even for nullable FI's -- they do not add one for the null byte. I missed that completely the first time I looked. I would prefer that the FI reflect the true length, but I guess this is the way it works and it's probably too late to "fix" it. Karl |
#13
| |||
| |||
|
|
Hi Karl, Thanks, But i suspect whether this situation happens? when return a nullable value while the last bit of the data happens to be set 1, will the DBMS treat it as NULL? For example i want to return char(5) -- 'ab123' , the last character '3' is '110011' which make the macro adf_isnull_macro to be true. |
![]() |
| Thread Tools | |
| Display Modes | |
| |