picture and text insert
Ruslan Zasukhin
sunshine at public.kherson.ua
Wed Apr 11 02:14:58 CDT 2007
On 11/4/07 2:57 AM, "Kim Kohen" <kim at webguide.com.au> wrote:
> G'day Ruslan,
>
>> SQL way with binding should be good choice.
>> Because it is bad idea to insert big blob/text values inside of SQL
>> query.
>
> these are only 175px previews - about 100k each.
>
> What form should the preview be in? Binary, text, base64? I tried
> writing the picture to a temp file, reading the binary data and then
> inserting the binary data into the Blob and it failed using plain SQL
> (unexpected token).
>
> It would be nice if I could use SQL to just place the (RB) Picture
> object directly into the picture field as per the API version.
I recommend to use this way:
dim curs as Vcursor
curs = db.SqlSelect( "SELECT fldPict FROM T WHERE false" )
curs.SetBlank()
curs.PictureField( "fldPict" ).SavePictureAs( pict )
curs.AddRecord()
In this way, VCLIENT will know that it get really a PICTURE.
And it will execute JPG compression right on client computer, then send by
network to remote computer MUCH smaller size of data. Server get ready JPG
and just save it to db on disk.
--
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