Copy data from string field to memo field

Copy data from string field to memo field

Post by Koos Loot » Sun, 31 Dec 1899 09:00:00



Hi all

Two questions from a newbie.
1) How do one copy data from a string field to a memo field in a table
(runtime)?..
     I know how to programatically run through the table and change the
value of
     a field for all records in that table. But if you can just help me with
the above
      question.

2) How do one display the data in a memo field in a DBGrid?.
     If there is data in a memo field, only the word <MEMO> is displayed on
the
     DBGrid.

Thank you.

 
 
 

Copy data from string field to memo field

Post by Sundial Service » Sun, 31 Dec 1899 09:00:00



> Hi all

The "TMemoStream" object is a good way to work with memo-fields.  Oddly
enough, last time I used one I found that I had to create and destroy it
for every single record.

There are some third-party grid objects that can display memos but what
is more commonly done is to have the user click on the item, then
display the value in a pop-up box or in a separate memo-field area on
the screen.  

Quote:> Two questions from a newbie.
> 1) How do one copy data from a string field to a memo field in a table
> (runtime)?..
>      I know how to programatically run through the table and change the
> value of
>      a field for all records in that table. But if you can just help me with
> the above
>       question.

> 2) How do one display the data in a memo field in a DBGrid?.
>      If there is data in a memo field, only the word <MEMO> is displayed on
> the
>      DBGrid.

> Thank you.

--
------------------------------------------------------------------
Sundial Services :: Scottsdale, AZ (USA) :: (480) 946-8259

Quote:> Fast(!), automatic table-repair with two clicks of the mouse!
> ChimneySweep(R):  "Click click, it's fixed!" {tm}
> http://www.sundialservices.com/products/chimneysweep


 
 
 

Copy data from string field to memo field

Post by M.H. Avegaar » Sun, 31 Dec 1899 09:00:00


1) Just use:

Table1.FieldByName('SomeMemoField').AsString :=
Table1.FieldByName('SomeStringField').AsString;

2) Look at the AutoDisplay property of the TDBMemo control.



Quote:> Hi all

> Two questions from a newbie.
> 1) How do one copy data from a string field to a memo field in a table
> (runtime)?..
>      I know how to programatically run through the table and change the
> value of
>      a field for all records in that table. But if you can just help me
with
> the above
>       question.

> 2) How do one display the data in a memo field in a DBGrid?.
>      If there is data in a memo field, only the word <MEMO> is displayed
on
> the
>      DBGrid.

> Thank you.

 
 
 

1. Help: copy memo field from one table to another field

Mephist:
Use two dbmemo components - they could be hidden (visible=false), if
desired.
     DBmemo2.Lines.Assign(DBmemo1.lines);

You MAY even be able to set the new field directly equal to the existing
one (i.e., without ".asstring"):

TableB.FieldByName('Memo'):=TableA.FieldByName(memoname);

2. Index

3. Copying logical fields to a memo field in one database

4. tablespace

5. What is the syntax for copy a memo to a database memo field

6. Cannot install VFoxPro5 ODBC Driver

7. copying data from three fields and combining it to another field

8. Commit fired by trigger

9. Copying data from a TEXT field into two Varchar fields

10. copying field data to another field

11. copying data from clob field into long field

12. Copying Field data to new field

13. copy data from clob field into long field