Promotic
WikipediaLinkedInYoutubeTwitterFacebook

RsGet - method of object PmaAdo

Description:
Opens up the stored AdoRecordset object with defined identifier, that has been created previously by calling the RsOpen method.
Syntax:
Object RsGet(String sId)
Calling:
oRecordset = oDb.RsGet(sId)
Parameters:
sId(String) Unique identifier used by the PmaAdo object to store the specific AdoRecordset object.
Return Values:
If exists, then returns the stored AdoRecordset object with defined identifier. If doesn't exist, then returns the value null for JavaScript or Nothing pro VBScript.
Note:
ADO Record object:

Depending on the specific ADO Provider it is possible, that a single row SQL query result will not be returned in the form of the AdoRecordset object containing a single record, but in the form of the AdoRecord object (represents 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, the same way 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 AdoRecordset object, although in some special cases the system may also return the AdoRecord object.

Example:
Obtains the AdoRecordset object with defined unique identifier ("table1") from the PmaAdo object ("/TestAdoDb"). It is tested whether no error occurs and the method returned valid AdoRecordset object. Then all records of the AdoRecordset object are checked and the values of the first column of each record are written into the INFO system.
JavaScriptVBScriptSelect and copy to clipboard

var oDb = pMe.Pm("/TestAdoDb");
var oRs = oDb.RsGet("table1");
var nLastErr2;

if (oRs)
{
oRs.MoveFirst();
while (! oRs.EOF)
{
Pm.Debug("Field=" + oRs.Fields.Item(0).Value);
oRs.MoveNext();
}
}

History:
Pm8.01.00: Created
PROMOTIC 9.0.6 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