Difference between revisions of "MEMO UPDATE()"
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
(One intermediate revision by one user not shown) | |||
Line 14: | Line 14: | ||
<input parameters> | <input parameters> | ||
− | char *fldname; /* Address of a buffer containing the name of a memo field */ | + | char *fldname; /* Address of a buffer containing the name of a memo field */ |
char *memo; /* Address of a buffer containing the memo */ | char *memo; /* Address of a buffer containing the memo */ | ||
Line 57: | Line 57: | ||
==SEE ALSO== | ==SEE ALSO== | ||
− | [[BLOB_UPDATE()]], [[BLOB_WRITE()]], [[DBF_APPEND()]], [[DBF_DELETE()]], [[DBF_ISEXCLUSIVE()]], [[DBF_ISREADONLY()]], [[DBF_LOCKF()]], [[DBF_LOCKR()]], [[DBF_RECALL()]], [[DBF_UNLOCKF()]], [[DBF_UNLOCKR()]], [[FIELD_UPDATE()]], [[MEMO_MLCOUNT()]], [[MEMO_MLINE()]], [[MEMO_READ()]], [[MEMO_SIZE()]], [[MEMO_WRITE() | + | [[BLOB_UPDATE()]], [[BLOB_WRITE()]], [[DBF_APPEND()]], [[DBF_DELETE()]], [[DBF_ISEXCLUSIVE()]], [[DBF_ISREADONLY()]], [[DBF_LOCKF()]], [[DBF_LOCKR()]], [[DBF_RECALL()]], [[DBF_UNLOCKF()]], [[DBF_UNLOCKR()]], [[FIELD_UPDATE()]], [[MEMO_MLCOUNT()]], [[MEMO_MLINE()]], [[MEMO_READ()]], [[MEMO_SIZE()]], [[MEMO_WRITE()]] |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:SDK]] | [[Category:SDK]] |
Latest revision as of 16:33, 27 March 2009
PURPOSE
Update a memo field
SYNONYM
api_memo_update()
SYNOPSIS
#include "dbapi.h" int MEMO_UPDATE(fldname, memo) <input parameters> char *fldname; /* Address of a buffer containing the name of a memo field */ char *memo; /* Address of a buffer containing the memo */ <output parameters> none
DESCRIPTION
The MEMO_UPDATE() function will update the specified memo field with the contents of the memo buffer. The space occupied by the memo in the memo in the memo file is overwritten with the specified memo buffer. The MEMO_UPDATE() function is the same as using both the MEMO_RECLAIM() and MEMO_WRITE() function together.
A value of -1 will be returned if the field is not a MEMO.
EXAMPLE
The following example deletes the current contents of the specified memo and updates it with the value specified in the second parameter
#include "dbapi.h" dbapi_memo_update() { int result; if (_parinfo(1) == API_CTYPE && _parinfo(2) == API_CTYPE) { if (!DBF_ISEXCLUSIVE()) DBF_LOCKR(DBF_RECNO()); result = MEMO_UPDATE(_parc(1), _parc(2)); if (result) result = DBF_UPDATE(); if (!DBF_ISEXCLUSIVE()) DBF_UNLOCKR(DBF_RECNO()); } else { result = -1; } _retni(result); }
SEE ALSO
BLOB_UPDATE(), BLOB_WRITE(), DBF_APPEND(), DBF_DELETE(), DBF_ISEXCLUSIVE(), DBF_ISREADONLY(), DBF_LOCKF(), DBF_LOCKR(), DBF_RECALL(), DBF_UNLOCKF(), DBF_UNLOCKR(), FIELD_UPDATE(), MEMO_MLCOUNT(), MEMO_MLINE(), MEMO_READ(), MEMO_SIZE(), MEMO_WRITE()