Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Pm_LastErr - property of object AdoRecordset

Description:
The numeric error code of the result of the last executed method (property) of the AdoRecordset object.
Syntax:
Long Pm_LastErr
Calling:
n = oRs.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 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.
Example:
Test whether the MoveFirst method was completed without errors and whether the position of current record 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.7 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice