GetField returns different value from GetRecordAsPropList

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Jun 23 11:04:40 CDT 2006


On 6/23/06 10:55 AM, "Pierre Rossel" <prossel2 at myrealbox.com> wrote:

Hi Pierre,

> 
>>             if( isNull )
>>             {
>>                 pMmValue->ValueRelease( &fldValue );
>>             }
>> 
>> If field value is Null, then we simply make empty fldValue.
>> I.e. We DO NOT put string <Null> there.
>> I think this is Director issue.
> 
> I am not a XDK specialist, but I downloaded it and read a bit through the
> doc. I also looked in PRegEx xtra source code to try to find the way to set
> a value to void.

Wow. You do not need go so deeply :)
 
> Are you sure that a simple ValueRelease() call will set the value to void in
> property list ? I guess the ValueRelease will only decrement the reference
> counter.

And when counter become zero, object is destroyed.
 
> But the point is: if there is no chance to have a 1.11 update, even if there
> is a bug, is it worth looking for a solution in the source code ?

Pierre, you have not answer. What about switch to V4MD 2 ?

In V4MD 2 we can debug, improve, update..
Why you use 1.x ?


>> The correct code to extract value from this field is:
>>     
>>    curItem = MyQuery(
>>         "SELECT * FROM MediaItem WHERE RecID=" & p_iMediaItemId)
>> 
>>     isNull = curItem.GetFieldIsNull("mediaData")
>>  
>>     if( not isNull )
>>        value = curItem.GetField("mediaData")
>> 
>> 
>> You cannot just extract value. If you do this, you will get
>> ZERO for numeric
>> fields, and empty string for STRING/VARCHAR/TEXT.
> 
> Why not a real void value if the field is NULL ?
> One that will make voidP(value) return true.

Hmm. Good point.

Lingo have true VOID value which we map to SQL's NULL.

And you see that we return not VOID in V4MD 1.x..

Again, we can test this fast in V4MD 2, but not easy for 1.x


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list