Promotic
WikipediaLinkedInYoutubeTwitterFacebook

RsGet - method of object PmAdo

Description:
Opens up the stored AdoRecordset object with defined identifier, that has been created previously by calling the RsOpen method.
Syntax:
RsGet(sId As String) As Object
Calling:
Set oRecordset = oDb.RsGet(sId)
Parameters:
sId(String) Unique identifier used by the PmAdo object to store the specific AdoRecordset object.
Return Values:
If present, returns the stored AdoRecordset object with defined identifier. If not present, returns the value Nothing.
Note:
ADO Record object:

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.

Example:
Gain the stored AdoRecordset object with defined unique identifier ("table1") from the PmAdo object("/TestAdoDb"). It checks if errors occured and the method returned valid AdoRecordset object. Then all records in the AdoRecordset object are checked and the values of the first column of each record are written into the INFO system.
Dim oDb, oRs
Set oDb = pMe.Pm("/TestAdoDb")
Set oRs = oDb.RsGet("table1")
  oRs.MoveFirst
  Do Until oRs.EOF
    Pm.Debug oRs.Fields(0)
    oRs.MoveNext
  Loop
End If
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice