Promotic

Pm_LastErr - property of the AdoRecordset object

Description:
The numeric error code of the result of the last executed method (property) of the AdoRecordset object.
Syntax:
Long Pm_LastErr
Note:
Property access for read only.
 
In order to test the result of the last executed method (property) over any implementation ADO object (e.g. AdoRecordset, AdoField, AdoRecord) encapsulated by security layer (Wrapper object). In order to test the result of the last executed method (property) of the PmaAdo object similar properties PmaAdo.LastErr and PmaAdo.LastTextErr can be used.
See also:
Example:
Test whether the MoveFirst method was completed without errors and whether the current record position was really moved to first position. If the AdoRecordset did not contain any records or the record move failed, then the returned error can be tested by the AdoRecordset.Pm_LastErr method.
JavaScriptVBScriptSelect and copy to clipboard

oRs.MoveFirst();
if (oRs.Pm_LastErr == 0)
{
while (! oRs.EOF)
{
Pm.Debug(oRs.Fields.Item(0).Value);
oRs.MoveNext();
}
}
else
{
Pm.Debug(oRs.Pm_LastTextErr);
}

History:
Pm8.03.09: Created
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.