Converting ULong fields into ObjectPtr

Stan Busk maxprog at mac.com
Sat Apr 7 14:58:05 CDT 2007


Hi,

<<  dim link as Vlink = vdb.Table( "mytbl" ).ObjectPtrField 
( "myfld" )  >> doesn't work. I get a 'vLink expected byt get  
ObjectPtr' error.

Stan



> On 6/4/07 7:15 PM, "Stan Busk" <maxprog at mac.com> wrote:
>
>> Hi,
>>
>> I want to convert a ULong field into an ObjectPtr keeping the value.
>> Is the following code correct?
>>
>> ----
>> aRows = vdb.SQLExecute( "SET PROPERTY OnChangeType_ZeroObjectPtr TO
>> FALSE" )
>> newFld = vdb.Table( "mytbl" ).ChangeType( vdb.Table( "mytbl" ).Field
>> ( "myfld" ), EVFieldType.kTypeObjectPtr, 0 )
>> If newFld <> nil then
>>     If vdb.Table( "mytbl" ).Field( "myfld" ).Type =
>> EVFieldType.kTypeObjectPtr then
>>        vdb.Table( "mytbl" ).ObjectPtrField( "myfld" ).Target =
>> vdb.Table( "parenttbl" )
>>        vdb.Table( "mytbl" ).ObjectPtrField( "myfld" ).OnDeletion =
>> EVOnDelete.kRestrict
>>        vdb.Table( "mytbl" ).ObjectPtrField( "myfld" ).IsIndexed =  
>> True
>>     end if
>> end if
>> ----
>>
>> If my class define the field as:
>> mField = new VObjectPtr ("myfld", Parent, EVOnDelete.kRestrict,
>> EVFlag.fIndexed, "myLinkName" )
>> How the heck can I define "myLinkName" in the previous code? I can't
>> see any 'LinkName' parameter.
>
>     dim link as Vlink = vdb.Table( "mytbl" ).ObjectPtrField( "myfld" )
>
>     link.Name = xxxx
>
>
> -- 
> 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]
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina



More information about the Valentina mailing list