The way of implementing methods and properties (e.g. AdoRecordset.Update) for all ADO objects (e.g. AdoRecordset, AdoField, AdoRecord) causes instant halt of script on any error(s) in the script that called the method. This is unfavourable behavior. Therefore the PROMOTIC wrapps automaticaly each ADO object with own security layer (the Wrapper object). The Wrapper allows to call all methods and properties of any object that is inside the Wrapper. The Wrapper catches possible errors in the original object and remembers the code of the last error. It prevents the halt of script caused by error that may occure by calling the method of the ADO object. The object wrapped in the security layer of the Wrapper object is best observed as the original object, because the layer allows to access all methods and propertiers of the wrapped object. It also adds new properties used for testing the results of last operation with the object (success/failure). IF any method or property of the original object returns a reference to another object, then the Wrapper of the original objects wrapps the reffered object with a new Wrapper object. This way it is secured that all ADO objects in the hierarchy are wrapped with the security layer automatically.
Reading the result of the last operation (over the objects PmAdo, AdoRecordset, AdoField) is handy in situations, when there is no way to estimate the result of such operation and while the method itself does not return the result of the operation. For example DbExecute, RsOpen, AdoRecordset.Update. See Example.
Depending on the specific ADO Provider it is possible, that a single row SQL query result will not be returned as AdoRecordset object containing a single record, but as a AdoRecord object, representing the single row. Není to ale typické pro nejběžněji užívané ADO Provider. The AdoRecord object is usually returned by explicit operations, when the specific AdoRecord is returned from the existing AdoRecordset object. The AdoRecord object consists of multiple AdoField objects, similar as the AdoRecordset object. The difference is that the methods for moving the position of current record are not supported (e.g. MoveFirst). In order to keep the documntation simple, it will be referred only to the commonly returned object AdoRecordset, although in some special cases the system may also return the AdoRecord object.
Some operations over the database can also be executed as asynchronous.
Caution: Asynchronous programming frequently causes comlications, therefore it is recommended to use the synchronous attitude. In case there is a chance, that the synchronous requests may take too much time and there is a possibility of timeout, then it is recommended to execute all operations in the working thread (See PmSequencer").