Page tree
Skip to end of metadata
Go to start of metadata

This function is used to return chunks TRecord from a table and is very useful to do a full read of a table 
The same can be accomplished using GetRecords passing the date and time to enumerate through the table. 


Used to call the function

  1. TableName - string
  2. RecordID - Integer
  3. NumberOfRecords - Integer
  4. opt - TRecordOptions


Returns the following

In this example we start by getting the first chunk from the table
then we take the RecordID of the last record returned and pass it in again until we finish enumerating through the table

Get Records from Job table
IItemServiceservice recService = new dkWS.IItemServiceservice() { TokenSecurityValue = new TokenSecurity() { Token = token.Token, AppID = token.AppID } };
var jOpt = new TRecordOptions() { ExtraProperties = new string[] { "RecordID", "Number", "Name", "RecordModified" }, MaxRecords = 100, UseXMLDateTime = true };
var recs = recService.GetRecordEX("pjjob", 0, 100, jOpt);
List<TRecord> list = new List<TRecord>();
while(recs.Count()> 80)
    var iLast = Convert.ToInt32(recs[recs.Count() - 1].Fields.SingleOrDefault(x => x.Name.ToLower() == "recordid").Value);
    recs = recService.GetRecordEX("pjjob", iLast, 100, jOpt);