Converting ULong fields into ObjectPtr

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Apr 6 16:42:45 CDT 2007


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]




More information about the Valentina mailing list