BLOBs

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Jan 9 21:15:33 CST 2005


On 1/9/05 8:28 PM, "geraint at geraintjones.com" <geraint at geraintjones.com>
wrote:

> Name:      Geraint Jones
> 
> Question regarding: sql
> 
> I‚ve read on various discussion lists that it may be possible to enter data
> into BLOB fields in a Valentina database table using an SQL INSERT command and
> binding the values to be inserted. Is this possible and do you have an example
> of the syntax of such a command?

Hi Geraint,

What API you use ?
 

If e.g. REALbasic then easy way is next:


    curs = db.SqlSelect( "SELECT fldBLOB FROM T" )

later

    curs.BlobField( "fldBLOB" ).WriteData( your data )
    curs.AddRecord()


------------
If you need SQL INSERT command, then you can to use binding.

For this you need create array of string

    dim params(0)   // 1 item

Add to array your blob value converted to String of RB

    params(1) = blobAsStr


Do 

    db.SqlExecute( "INSERT INTO T (fldBLOB) VALUES (:1)", params )



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