VB and VMD Blob

ricky wibowo valentinadb at gmail.com
Mon Apr 11 13:56:12 CDT 2005


hello,


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

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?

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




Thanks in a bunch

Ricky wibowo


More information about the Valentina mailing list