Blob Fields

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Feb 11 12:06:34 CST 2003


on 2/11/03 11:23 PM, Barney at barney at custombased.com wrote:

Hi Barney,

> Sorry I'm still not having any luck.
> 
> This is what I'm trying.
> 
> ==============================================
> 
> Dim Blb as VBlob
> Dim p as picture
> Dim BO as VBaseObject
>   
> p = flag  // pict file
> 
> Bo = window1.db.Baseobject("Assets")
>  
> Blb = Bo.CreateBlobField("FlagFld",6*1024)
> 
> 
> Blb.SetPicture(p)
> Bo.UpdateRecord()
> window1.db.flush
> 
> ============================================
> 
> The only way I can seem to get Blb to NOT be nil is to create
> a new field every time. If I go :
> 
> Blb = Bo.Field("FlagFld")

no

> I get incorrect syntax obviously. How do I get to have a representation of
> my Blob field that exists in my table. Presumably I need this to assign a
> picture to it.
> 
> In your example file it is a property of your base object class. How can I
> reproduce this with code ? there doesn't seem to be any syntax for this like
> there is for normal fields ? eg
> 
> Bo = window1.db.Baseobject("Assets")
> Fld = Bo.field("name")

Barney, you need read once again, that we can have 2 models
1) static -- with classes. You CANNOT change structure at runtime.
2) dynamic. -- no classes. But you can create/remove table/fields on the
fly.

IT seems you try to mix this 2 models.

You need look on example "Dynamic ..."

> The code up above although it executes completely still seems to have no
> effect. When I look in my data base file there is nothing except empty
> "FlagFld" fields. Also there is no second file like your example creates to
> store the picture in, just still my single file.

But do you use the same mode in db.Create() ?
Use at least for start mode 4.

> This example throws incorrect syntax error :
> cur.field("FlagFld").DeleteBLOB
    
Of course. Must be 
    
    cur.BLOBfield("FlagFld").DeleteBLOB


> Many thanks for your help

-- 
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://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list