Subject | Re: RES: [IBO] How to save rich text into blob fields |
---|---|
Author | Helen Borrie |
Post date | 2001-10-01T13:30:28Z |
At 10:19 AM 01-10-01 -0300, you wrote:
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
_______________________________________________________
>Ups... sorry about missing the Field in my email... the form I was using is:The dataset needs to be in a Prepared state - perhaps you could try
>
>IBOQuery1.FieldByName('CONTENT').Assign(RichEdit1.Lines);
>
>When I use this method I get AV error!!!
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
_______________________________________________________