V4MD 2 setPicture

Scott Runkel srunkel at hypix.com
Wed Mar 7 13:22:26 CST 2007


Ruslan,

> Please check
>        V4MD/Examples/API/Field_Pictures
>        V4MD/Examples/SQL/ Pictures

I finally got it to work using:

fldPicture = cursor.field("picture")
memberRef = member("PICTEST")
imageVar = memberRef.image
fldPicture.setImage(imageVar, 75)
        -- also worked without parameter 75.

But first I tried about 10 different ways that DID NOT work and should have. 
Examples below:

cursor = pDB.SqlSelect(sql, #kClientSide, #kReadWrite, #kRandom)
cursor.field("picture").setPicture(member "PICTEST")
    "valentina error in updateRecord: Cursor "1" is read only."
-----------
cursor = pDB.SqlSelect(sql, #kServerSide, #kReadWrite, #kRandom)
cursor.field("picture").setPicture(member "PICTEST")
     tried with both 16-bit and 32-bit image
------------
 fldPicture = cursor.field("picture")
 fldPicture.setPicture(member "PICTEST")
     tried with both 16 and 32 bit image
------------
fldPicture = cursor.field("picture")
fldPicture.setPicture(member "PICTEST", #kJPG, 75)
-------------
fldPicture = cursor.field(fieldname)
imageVar = memberRef.image
fldPicture.setImage(imageVar, #kJPG, 75)
    Note that this is the same as what worked, except here I had the #kJPG 
parameter

In ALL cases above I confirmed that I had a good cursor by updating a varchar 
column at the same time, which ALWAYS worked perfectly. I also confirmed that I 
had a good image. I also tried various other combinations not noted above.

I must conclude that setPicture is broken in my case. I don't know if this is 
related to my database having been updated from v1, or something else.

-SR

Scott Runkel
Director of Technology
Hypix Media, Inc.
503-722-2123 




More information about the Valentina mailing list