Subject | Re: [IBO] TIB_DSQL |
---|---|
Author | Lucas Franzen |
Post date | 2004-02-23T19:41:02Z |
Hi Michael,
haven't emailed quite a long time ;-)
Michael Vilhelmsen schrieb:
(in my example it's a TIB_Cursor not a TIB_DSQL)
Save Memo-content To Blob-column
with myCursor do
begin
Memo.Lines.SaveToStream (
TIB_BlobStream.CreateForColumn (
FieldByName ( 'MY_BLOBFIELD' ), bsmWrite ) );
end;
Load Memo from Blob column:
with myCursor do
begin
Memo.Lines.LoadFromStream (
TIB_BlobStream.CreateForColumn (
FieldByName ( 'MY_BLOBFIELD' ), bsmRead ) );
end;
I think this should be valid for ParamByName in a TIB_DSQL, too.
Luc.
haven't emailed quite a long time ;-)
Michael Vilhelmsen schrieb:
> Hiwhen I save / load Blobs from / to Memos (or RTF) I use something like:
>
> As mentioned earlier today I'm about to convert from TIBOQuery to
> either TIB_Cursor or TIB_DSQL.
> Now I know how to use TIB_Cursor.
> Thank you both Jason and Lucas.
>
> But now I have a little problem with TIB_DSQL.
> I have some inserts, which I at this point do like this:
>
> Ins_Table.ParamByName('MyBlob').AsBlob := Memo.Lines.Text;
(in my example it's a TIB_Cursor not a TIB_DSQL)
Save Memo-content To Blob-column
with myCursor do
begin
Memo.Lines.SaveToStream (
TIB_BlobStream.CreateForColumn (
FieldByName ( 'MY_BLOBFIELD' ), bsmWrite ) );
end;
Load Memo from Blob column:
with myCursor do
begin
Memo.Lines.LoadFromStream (
TIB_BlobStream.CreateForColumn (
FieldByName ( 'MY_BLOBFIELD' ), bsmRead ) );
end;
I think this should be valid for ParamByName in a TIB_DSQL, too.
Luc.