RangeFirst enum | QSYS API Reference Guide
Specifies the first range of a sequence.
Namespace: ASNA.DataGate.Common
Assembly: ASNA.QSys.DataGate.Client.dll
Enum Values
Name | Description | Value |
---|---|---|
Exclude | The first element is excluded from the range. | 0 |
Include | The first element is included in the range. | 1 |
Top | The range starts from the top. | 2 |
Examples
AdgConnection db = new AdgConnection("*Public/DG NET Local");
FileAdapter dbFile = new FileAdapter(db, "*Libl/CMASTNEWL1", "CMMASTERL1");
dbFile.AccessMode = AccessMode.RWCD;
AdgDataSet myDS = null;
try
{
dbFile.OpenNewAdgDataSet(out myDS);
}
catch(dgException dgEx)
{
MessageBox.Show("Error opening file! " + dgEx.Message, "Error");
//Exit procedure or end application here.
}
/* We erase all records with a customer number equal to
* or greater than 5000 and less than, but not
* equal to, 6000. */
AdgKeyTable OneKey = myDS.NewKeyTable("RCMMastL1");
OneKey.Row["CMCustNo"] = 5000;
AdgKeyTable TwoKey = myDS.NewKeyTable("RCMMastL1");
TwoKey.Row["CMCustNo"] = 6000;
try
{
dbFile.DeleteRange(OneKey, RangeFirst.Include, TwoKey, RangeLast.Exclude);
}
catch(dgException dgEx)
{
MessageBox.Show("Error deleting records 5000-6000 :" +
dgEx.Message, "Error");
}
dbFile.Close();
db.Close();