|
The QMDeleteu() function deletes a record from a file, retaining the record lock. It is analogous to the QMBasic DELETEU statement.
The function arguments are:
| FileNo | is the file number returned by a previous QMOpen() call. |
| Id | is the id of the record to be deleted. |
The QMDeleteu() function deletes the named record from the file open as FileNo. No error occurs if the record does not exist.
Applications should always obtain an update lock for a record before deleting it. The lock is not released by this function.
The program fragment in the examples below opens the CLIENTS file and deletes the record identified by ClientNo. Note the use of a record update lock to comply with recommended programming rules.
void QMDeleteu(int FileNo, char * Id)
fClients = QMOpen("CLIENTS");
QMRecordlock(fClients, ClientNo, TRUE, TRUE);
QMDeleteu(fClients, ClientNo);
|
QMDeleteu ByVal FileNo as Integer, ByVal Id as String
fClients = QMOpen("CLIENTS")
QMRecordlock(fClients, ClientNo, True, True)
QMDeleteu(fClients, ClientNo)
|
Deleteu(FileNo, Id)
fClients = session->Open("CLIENTS")
session->Recordlock(fClients, ClientNo, @true, @true)
session->Deleteu(fClients, ClientNo)
|
Deleteu(int FileNo, String Id)
fClients = qm.Open("CLIENTS");
qm.Recordlock(fClients, ClientNo, true, true);
qm.Deleteu(fClients, ClientNo);
|
Deleteu(FileNo, Id)
fClients = qm.Open("CLIENTS");
qm.Recordlock(fClients, ClientNo, True, True);
qm.Deleteu(fClients, ClientNo);
|
|