[V4MD] Problem with setPicture / getPicture
Andrew Sinning
andrew at learningware.com
Tue Mar 9 19:49:23 CST 2004
I was having problems with SetMedia, which is similar to SetPicture.
Turned out I wasn't calling UpdateRecord() after SetMedia.
-----Original Message-----
From: valentina-bounces at lists.macserve.net
[mailto:valentina-bounces at lists.macserve.net]On Behalf Of Scott Runkel
Sent: Tuesday, March 09, 2004 6:31 PM
To: Valentina Developers
Subject: [V4MD] Problem with setPicture / getPicture
For the life of me I can't quite get setPicture/getPicture to work. This
is
Director MX, Windows XP, authoring. I apologize if there's just some
little
thing I have overlooked, but after about 3 hours with this, I just can't
keep
working on it.
I am trying to put a bitmap into my existing database. I have a
"picture"-type
field called "picture".
I have boiled down what I'm trying to the following test handlers. The
first one
attempts to set the picture, the second attempts to get the picture.
When I
finally do "getPicture" at the end of the second handler, I get:
* V4MD *: GetPicture...error -2147218498
But note that at the end of the first handler, "getpicture" is
successful! I
don't understand what's happening between that point and the next time I
try to
get the picture, when it fails. Is there some command I am missing? I
threw in a
"flush" command for good measure, didn't seem to help.
on setpicturetest
sql = "select * from media where type = 'figure'"
gocursor = 0
goCursor = new(Xtra "VCursor", GetRef(goDB), sql, 2, 3, 2)
put "count = " & getrecordcount(goCursor) -- this returns 1
goToRecord(goCursor, 1)
put getfield(gocursor, "linktext") -- this returns the correct text
from the
record
setpicture(goCursor, "picture", member "PIR-1992-01-05-01", 50)
flush(goDB) -- * V4MD *: SetPicture...done
getpicture (goCursor, "picture", member "pictest") -- the correct
picture
appears in the member
end
on getpicturetest
sql = "select * from media where type = 'figure'" -- there is only
one such
record
gocursor = 0
goCursor = new(Xtra "VCursor", GetRef(goDB), sql, 2, 3, 2)
put "count = " & getrecordcount(goCursor) -- returns 1
goToRecord(goCursor, 1)
getpicture (goCursor, "picture", member "pictest")
end
Thanks.
-SR
Scott Runkel
Director of Technology
Hypix Media, Inc.
503-722-2123
_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina
More information about the Valentina
mailing list