picture field - V4MD

Ruslan Zasukhin sunshine at public.kherson.ua
Sat Sep 13 12:06:04 CDT 2003


on 9/13/03 11:32 AM, Vector Vibe at karthkyn at hotmail.com wrote:

> Okay gr8, this is the procedure..
> 
> 1. check the 'Create vDB' button script to see the Database Strucure
>   it has two fields in a Table 'Products'
>   a. SWTID #kTypeShort
>   b. SWEETPIC #kTypePicture , 5120
> 
> 2. import attached picture (file name 1024.jpg) into the cast, anywhere.
> note: i have already imported one record into the database with SWTID 1024
> 
> 3. try to store the picture using the 'retrieve ID & store picture'
>   this actually takes the "1024" picture from the cast and
>   imports it into the Aura vDatabase's SWEETPIC field
> 
> 4. use 'getPicture' button to import picture from the database into another
> cast member "pic"
> 
> now director returns 'error -2147218498' in the message window!
> 
> then in the message window, i tried
> put MOAErrorToString(-2147218498)
> -- "Media access error: Media data is invalid"
> 
> 
> Thanks for any help!

Well,

You have made very simple mistake!

You have forget to make UpdateRecord() for cursor.
After this it works fine.


-------------------
repeat with i = 1 to RecCount
    getSWTID = getField( compCursor, 1)
    put getSWTID
    
    SetPicture( compCursor, "SWEETPIC", member(string(1024)), 90)
    UpdateRecord( compCursor )
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

-------------------




-- 
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://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list