VBlob.readRawData and type mismatch

Ruslan Zasukhin sunshine at public.kherson.ua
Thu Jun 12 22:29:49 CDT 2003


on 6/12/03 18:09, Chuck at rwc1717 at shaw.ca wrote:


Hi Chuck,

> After a bunch of experiments I decided to leave out the size compnent after
> the blob.readrawdata() command and that seems to do the trick....I can write
> and read all the raw data I want into the blob field....movies here we come.


> MonkeyBread suggested that I use the blob fields and simply store the jpeg
> directly....but I found I still had to do one PictureToString() conversion
> first before I could writerawdata() to the blob field.....:-).

If you simply store JPGs directly then this will work for your app.,
And this will be cross-platform.

But you should understand that such pictures of your db will not be
correctly displayed in future Valentina Studio, because it will not know
that this is pictures.

If you can live with this, then no problems.

--------
Chuck, 

In V4RB exists 2 new functions.
They are not documented yet.

    GetFormatedPict() as String
    PutFormatedPict(inPictType as Integer, inPictData as String)

As picture type you should use the next numbers

    kFBL_Unknown             = 0,
    kFBL_MacPict             = 1,
    kFBL_MacCICN            = 2,
    kFBL_MacIconSuite        = 3,
    kFBL_MacGWorld            = 4,
    
    kFBL_WinDIB                = 10,
    
    kFBL_JPG                = 20,
    kFBL_TIFF                = 21,
    kFBL_GIF                = 22

Try this and let me know how it works for you.
We have use self such way for Valentina PHP module.

Using this way you will be compatible with all other Valentina products.


And yes, you still need convert it to String object.


> After a blob.readrawdata and using one StringToPicture() to conversion..I
> could retrieve it and display it again. I have sent Christian the code that I
> am finally using to see if I understood what he and you were suggesting
> correctly and perhaps to confirm if it would work on windows
> machines......that being said...there is a lot less code than I was using
> before:-)...it works on the apple:-)....and I will test it on a windows
> machine.

> If it okay...that is, it works...I will post it.

So you have resolve problem on Windows?


-- 
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