_DBReplace() Function Requires Record to Be LockedID: Q117594 The information in this article applies to:
SUMMARYWhen you are attempting to use the _DBReplace() function to place a new value in a field, _DBReplace() will return a negative integer if the current record is not locked. _DBReplace() provides functionality similar to the FoxPro REPLACE command, but replaces the value of only one record at a time. When you attempt to use _DBReplace() to place a new value in a field, _DBReplace() will return a 0 if the replacement was successful or a negative integer whose absolute value is a FoxPro error number if the replacement was unsuccessful. Unlike the FoxPro REPLACE command, _DBReplace() must lock the current record in order to perform the replacement. The sample code below illustrates how the _DBReplace() function works.
MORE INFORMATIONTo run the sample code below, you will need to use the following syntax:
When you are using _DBReplace(), you must pass the name of the field that
contains the information you want to replace.
NOTE: To see the error, you must comment (remark) out the following line of code as shown (this line is used to lock the record):
Sample Code
Additional reference words: FoxWin FoxDos 2.00 2.50 2.60 API LCK
KBCategory: kbinterop kbtool kbprg kbcode
KBSubcategory: FxtoolLck
|
|
Last Reviewed: June 27, 1995 © 1999 Microsoft Corporation. All rights reserved. Terms of Use. |