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

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

Post by Kenneth P. Reeder, Ph.D » Sun, 31 Dec 1899 09:00:00



Can someone please tell me what the syntax is for copying the contents
of a memo field (i.e., memo.lines) to a memo field in a database.
Better yet, I know that

Memo.lines.LoadFromFile('filename')

will load the contents of a file into memo.lines.  Is there a way to use
LoadFromFile to load directly into the memo field in the database.

ALL help is appreciated.

Thanks, Ken

 
 
 

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

Post by Charles Bédar » Sun, 31 Dec 1899 09:00:00


If your goal is to load a text file (on disk) in a MemoField, then simply
do this:

having declared and created: TextLines : TStringList;

TextLines := TStringList.Create;    
TextLines.LoadFromFile('text.txt');
Table1.Edit;
Table1.FieldByName('MemoFieldName').AsString := TextLines.Text;
Table1.Post;

done.
--
Charles Bedard



Quote:> Can someone please tell me what the syntax is for copying the contents
> of a memo field (i.e., memo.lines) to a memo field in a database.
> Better yet, I know that

> Memo.lines.LoadFromFile('filename')

> will load the contents of a file into memo.lines.  Is there a way to use
> LoadFromFile to load directly into the memo field in the database.

> ALL help is appreciated.

> Thanks, Ken


 
 
 

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

Post by Serr.. » Sun, 31 Dec 1899 09:00:00



> If your goal is to load a text file (on disk) in a MemoField, then simply
> do this:

> having declared and created: TextLines : TStringList;

> TextLines := TStringList.Create;
> TextLines.LoadFromFile('text.txt');
> Table1.Edit;
> Table1.FieldByName('MemoFieldName').AsString := TextLines.Text;
> Table1.Post;

> done.
> --
> Charles Bedard



> > Can someone please tell me what the syntax is for copying the contents
> > of a memo field (i.e., memo.lines) to a memo field in a database.
> > Better yet, I know that

> > Memo.lines.LoadFromFile('filename')

> > will load the contents of a file into memo.lines.  Is there a way to use
> > LoadFromFile to load directly into the memo field in the database.

> > ALL help is appreciated.

> > Thanks, Ken

 
 
 

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

I was wondering if anyone had any suggestions on this.

I have a table with numerous logical fields and a couple of memo fields. What
I'd like to do is this:

When someone enters a false logical in a field, that field name will be added
to one of the memo fields.

I've got a form for users to enter the data, so I'm thinking that that can be
designed to do the job, but I'm not sure exactly how. I am a OPAL beginner, but
don't let that scare you away from suggesting code.

Please let me know if anyone has any ideas. Anything will be much appreciated.

Thanks in advance.

2. Fed up of Oracle

3. Copy data from string field to memo field

4. DTS Error: it tries to insert null into column when no not null

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

6. help eliminating temp table

7. Indentation of memo fields - reports vs. modify memo

8. FREE Delphi 2.0 Client-server Seminars

9. Converting Memos/Memo fields

10. Where am I ? FPD/Memo field

11. Syntax error when updating Memo field in a view in VFP5

12. Syntax error in UPDATE statement while using a Memo field

13. Paradox 4.0 and copying MEMO fields