Field Types ?

Ruslan Zasukhin sunshine at public.kherson.ua
Thu Mar 29 15:48:42 CDT 2007


On 29/3/07 9:04 PM, "bart.pietercil at gmail.com" <bart.pietercil at gmail.com>
wrote:

Hi Bart,
 
> This query
> 
> SELECT recid,ass_title, assesment_date,is_finished FROM assesments WHERE
> user_ptr =  ?
> 
> is_finished is defined as type boolean
> 
> builds a VCursors where I do this:
> 
>         case 2
>           test = mCursor.Field(i).Type--> debugline
>           aFieldName = mCursor.Field(i).Name--> debugline
>           'test = EVFieldType.kTypeBoolean
>           Select Case mCursor.Field(i).Type
>           case EVFieldType.kTypeBoolean
>             me.CellCheck(me.LastIndex,i-1) = mCursor.BooleanField(i).Value
>           end Select
>         end Select
> 
> 
> This works as expected: is_finished is a boolean so working with
> EVFieldType.kTypeBoolean should switch to the code I want
> 
> However:
> 
> This query
> 
>    "select recid, (assesment_ptr->ass_title) AS
> 'in_assessment',(assesment_ptr->assesment_date) AS 'assessment_date',
> (assesment_ptr->is_finished) AS 'is_finished' " + _
>   " FROM a_compcards where orig_compcard_recid = ?  AND
> assesment_ptr->user_ptr = " _
>    + CurrentUser.Value("recid").StringValue
> 
> runs through the same method and is_finished is the SAME field as in the
> other query but does NOT trigger the codefragment because Field(i).Type now
> is 10 instead of 2 (boolean)
> 
> Can anybody please explain what is going on.

Quick guess.

* assesment_ptr->is_finished    -> is EXPRESSION, exactly as
    
       (fld + 5)  


* RESULT of expression can be one of 3 types:
        Integer
        Double
        String

So I think you get INTEGER (type 10)


-- 
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