[VXCMD] Newbie Really basic ObjectPtr question...
Ruslan Zasukhin
sunshine at public.kherson.ua
Tue Feb 11 09:09:22 CST 2003
on 2/11/03 8:55 AM, Rodney Tamblyn at rodneytamblyn at paradise.net.nz wrote:
> I've written a simple MC stack which traverses a directory of files and
> imports these into a valentina database. This part is working fine.
>
> I'd like to use ObjectPtr fields to relate images and other blobs in
> the Media table to specific records in the Content table, allowing many
> to one relationship.
>
> First I create two tables "Content" and "Media"
>
> In the Media table I define blob flds for images, thumbnails, movies,
> etc
> In the Content table I define a variety of fields, including 3
> ObjectPtr flds pointing at the Media table: ImagePtr, ThumbPtr,
> MoviePtr
>
> To create these flds I use:
>
> get Valentina( "BaseObject_MakeNewField", boContentRef, "ImagePtr",
> "ObjectPtr", boMediaRef, 1 )
>
> Now, imagine I have come to the point where I wish to add a reference
> to a particular image (let's say it's the first record in the Media DB)
> to a record in the Content table. How do I do this?
Consider ObjectPtr as ulong field.
so simply assign 1 to this field.
> I wonder if you use Cursor_GetFieldRef( CursorRef, fldNameOrIndex ) to
> get a reference to the desired image in the Media table, then set the
> ImagePtr fld of the Content table to this?
No.
FldRef this is pointer to Field itself.
You need store in ObjectPtr the RecID of record of table Media, i.e. 1
> It's not clear to me from the documentation, either VXCMDReference or
> ValentinaKernal how to actually establish this relationship.
>
> Thanks for help and suggestions....
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list