Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual FoxPro
Expertise: Beginner
May 9, 2000

Memo Fields

Question:
I have a memo field in a table, which has been scattered to memvar. I need to append a standard statement to the field once the user has completed entering data.

I am trying to achieve the following effect:

m.dispatchnote=m.dispatchnote+stdstatement
Can you show me a way?

Answer:
What you have done so far is fine, but to update the memo field, you have to perform a GATHER MEMVAR MEMO. This takes the contents of the memory variables and moves them into the fields. Here is a code sample that creates a cursor with a memo field, scatters it into memory variables, updates the memory variable that represents the memo field, gathers the memory variables back into the cursor, and then shows you the contents of the memo field:

stdstatement = "this is my standard statement"
CREATE CURSOR Rick (mDNote M)
APPEND BLANK
REPLACE mDNote WITH "Here is some text."
SCATTER MEMVAR MEMO
m.mdnote=m.mdnote+stdstatement
GATHER MEMVAR MEMO
MODIFY MEMO mDNote
If you were not using SCATTER, you could do the following:
REPLACE mDNote WITH mDNote+stdstatement
DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap