[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 123456789[10] ]

[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 06:07:28 04/24/00 Mon
Author: Michel
Subject: Re: Save the Image into SQL throught Query?
In reply to: Raymond Cheng 's message, "Save the Image into SQL throught Query?" on 14:10:01 04/23/00 Sun

Hi Raymond,

I'm not sure what the correct solution to this is. The first thing I would do is ensure that your stream is valid by saving it to a file. When using a TBlobStream I don't think in the constructor you specify the stream mode (read or write) and you don't need to call SaveToStream. Maybe this is because your BlobStream variable is not a TBlobStream type.

Try posting message to borland.public.delphi.database.desktop or borland.public.delphi.database.sqlservers

I'm sure there are many persons very knowledgeable in SQL with parametrized queries using blob fields.

Best regards,


> Hi Michel,
> I try to using the following code to insert the image
> into
> SQL database:
> ImageScrollBox1.SaveToStream(BlobStream,'JPG');
> with tdb.Qtemp do begin
> Close;
> SQL.clear;
> SQL.add('insert into
> pattern_info(pattern_image) values(:p1)');
> Params[1].AsBlob := BlobStream;
> execSQL;
> end;
> but it doesn't work!
> Please tell me how to do this!!!
> Thank in advance
> from Raymond Cheng.

[ Next Thread | Previous Thread | Next Message | Previous Message ]

[ Contact Forum Admin ]

Forum timezone: GMT-5
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.