Subject Re: RES: [IBO] How to save rich text into blob fields
Author Helen Borrie
At 10:19 AM 01-10-01 -0300, you wrote:


>Ups... sorry about missing the Field in my email... the form I was using is:
>
>IBOQuery1.FieldByName('CONTENT').Assign(RichEdit1.Lines);
>
>When I use this method I get AV error!!!

The dataset needs to be in a Prepared state - perhaps you could try

with IBOQuery1.do
begin
...
if not Prepared then
Prepare;
FieldByName('CONTENT').Assign(RichEdit1.Lines);
...
or (for the second statement) possibly substitute:
InternalDataset.Fields.ByName('CONTENT').Assign(RichEdit1.Lines);

But I __think__ FieldByName and ByName actually do the Prepare for you. Perhaps you need to test for this:

if RichEdit1.Lines.Count > 0
then...

Check to make sure your blob column is SUB_TYPE 0 or SUB_TYPE 1 as well.

rgds,
Helen


All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________