Board index » delphi » ask: Oracle Memo fields and Delphi TMemo component

ask: Oracle Memo fields and Delphi TMemo component

Hello,
I'm trying to <b>insert</b> and <b>extract</b> data from an Oracle8i memo field
into a delphi Tmemo component. I tried to put 'AsMemo' on the end of the
statement but received this error:

-----------------------------------------------------------------------------------------------
I tried this:

Statement:

TMemo.Lines := Query1.Fields[26].AsMemo;

Error:
[Error] fMain_cstars.pas(1102): Undeclared identifier: 'AsMemo'

Then this:

Statement:
TMemo := Query1.Fields[26].AsMemo;

Error:
[Error] fMain_cstars.pas(1105): Incompatible types: 'TMemo' and 'TField'

----------------------------------------------------------------------------------------------------

My instinct is that I need to know how many lines are in the oracle db memo
component. Do I have to dump the Oracle memo data into a delphi array and then
count number of lines by parsing character by character til I find the
delimiter? What is the Oracle end of line delimiter in a memo component? Could
you please provide a code sample or direct me to a function to do this? Thanks
so much in advance. Yall are the best Ive found on the internet!

--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

 

Re:ask: Oracle Memo fields and Delphi TMemo component


Quote
"Kathy Frisk" <fri...@dor.state.fl.us> wrote in message <news:adb6f61b06f32dddc81d61e474958554.46814@mygate.mailgate.org>...
> Hello,
> I'm trying to <b>insert</b> and <b>extract</b> data from an Oracle8i memo field
> into a delphi Tmemo component. I tried to put 'AsMemo' on the end of the
> statement but received this error:

> TMemo.Lines := Query1.Fields[26].AsMemo;

> Error:
> [Error] fMain_cstars.pas(1102): Undeclared identifier: 'AsMemo'

> Then this:

> Statement:
> TMemo := Query1.Fields[26].AsMemo;

> Error:
> [Error] fMain_cstars.pas(1105): Incompatible types: 'TMemo' and 'TField'

You must simply add TDBMemo Component on a form and link it with you query1
through it DataSource and DataField properties.
Then you can do what you want.

Re:ask: Oracle Memo fields and Delphi TMemo component


Quote
On Thu, 10 Jan 2002 17:57:54 +0000 (UTC), Tony wrote:

I'd recomend TDBMemo as well, if you want to contine with a normal
memo, then what you do is save the content of the memo to a stream and
then set your TMemo with TMemo.Lines.LoadFromStream. P.S. Don't forget
to Seek(0,soFromBeginning) in between the save and the load.
Look up TBlobStream in the help
Quote
>Hello,
>I'm trying to <b>insert</b> and <b>extract</b> data from an Oracle8i memo field
>into a delphi Tmemo component. I tried to put 'AsMemo' on the end of the
>statement but received this error:

>-----------------------------------------------------------------------------------------------
>I tried this:

>Statement:

>TMemo.Lines := Query1.Fields[26].AsMemo;

>Error:
>[Error] fMain_cstars.pas(1102): Undeclared identifier: 'AsMemo'

>Then this:

>Statement:
>TMemo := Query1.Fields[26].AsMemo;

>Error:
>[Error] fMain_cstars.pas(1105): Incompatible types: 'TMemo' and 'TField'

>----------------------------------------------------------------------------------------------------

>My instinct is that I need to know how many lines are in the oracle db memo
>component. Do I have to dump the Oracle memo data into a delphi array and then
>count number of lines by parsing character by character til I find the
>delimiter? What is the Oracle end of line delimiter in a memo component? Could
>you please provide a code sample or direct me to a function to do this? Thanks
>so much in advance. Yall are the best Ive found on the internet!

>--
>Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

Re:ask: Oracle Memo fields and Delphi TMemo component


Quote
"Kathy Frisk" <fri...@dor.state.fl.us> wrote in message

news:adb6f61b06f32dddc81d61e474958554.46814@mygate.mailgate.org...

Quote
> Hello,
> I'm trying to <b>insert</b> and <b>extract</b> data from an Oracle8i memo field
> into a delphi Tmemo component. I tried to put 'AsMemo' on the end of the
> statement but received this error:

> -----------------------------------------------------------------------------------------------
> I tried this:

> Statement:

> TMemo.Lines := Query1.Fields[26].AsMemo;

> Error:
> [Error] fMain_cstars.pas(1102): Undeclared identifier: 'AsMemo'

if you use persistent fields, you can write a code like:

MyMenmo.Lines.Assign(Query1FIELD26NAME.VALUE);

You cant'use Tmemo ad component name.
It is a class name and reserved word.

Bye

AS

--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

Re:ask: Oracle Memo fields and Delphi TMemo component


Quote
> MyMenmo.Lines.Assign(Query1FIELD26NAME.VALUE);

Sorry...
This line have a error!
Value property for TmemoField is string type.
Assign have a tstrings parameter.

MyMemo.Text := Query1FIELD26NAME.VALUE

To get lines count:

MyMemo.Lines.Count.

Bye

AS

--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

Other Threads