VB and VMD Blob

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Apr 11 10:19:21 CDT 2005


On 4/11/05 9:56 AM, "ricky wibowo" <valentinadb at gmail.com> wrote:

Hi Ricky,
 
> My valentina is version 1.x . I used to save and view blob with MD
> (PICT files) and there's no problem.

So you use Vpicture field of Valentina. Right?

Why you say: I store BLOB?
Do you mean: I store pictures?

Do you use SetMedia or SetPicture handlers ?
 

> but yesterday my client ask to update the catalog, so i try to save
> blob using visual basic using ADODB.stream
> 
> after it run, the file become bigger and bigger, i suppose the saving
> is worked. but after run with MD, the data is shown and not the blob.
> 
> so can i request example vb script to saving blob please?

I believe that VCOM archive contains example how to work with Picture field.
Please check it.

> this is the vb script
> 
>     Dim bo As VBaseObject
>     Set bo = db.BaseObject("rdInventory")
>     i = 1
>     bo.FirstRecord
>     While Not i >= bo.RecordCount
>         
>         
>         If cekfile(bo.Field("fd_Group").Value & "-" &
> bo.Field("fd_Code").Value) Then
>             Set mystream = New ADODB.Stream
>             mystream.Type = adTypeBinary
>             
>             mystream.Open
>             'MsgBox txtimgdir.Text & "\" & bo.Field("fd_Group").Value
> & "-" & bo.Field("fd_Code").Value & ".pct"
>             mystream.LoadFromFile txtimgdir.Text & "\" &
> bo.Field("fd_Group").Value & "-" & bo.Field("fd_Code").Value & ".pct"
>             bo.Field("fd_blob").WriteBLOBData mystream.Read, 500
>             bo.UpdateRecord
>             mystream.Flush
>             mystream.Close
>             
>             Set mystream = Nothing

Hmm. You store .pct picture as is...using WriteBLOBData.

This will not work.
You should use function from VPicture field ...
Something as WriteAsPicture


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list