AdapterStatus enum | QSYS API Reference Guide

Enumerates the possible statuses of the FileAdapter.

Namespace: ASNA.DataGate.Client Assembly: ASNA.QSys.DataGate.Client.dll

Remarks

The AdapterStatus enumeration is used to represent the current status of the FileAdapter. It has two possible values: Closed and Open. ‘Closed’ indicates that the FileAdapter is not currently open for any operations. ‘Open’ indicates that the FileAdapter is open and ready for operations.



Enum Values

Name Description Value
Closed Indicates that the FileAdapter is not currently open for any operations. 0
Open Indicates that the FileAdapter is open and ready for operations. 1

Examples

Here we want to use a FileAdapter object named “dbFile” but are unsure as to whether or not it is been initialized, so we check for null and use the Status property to make sure it is opened and open it if it isn’t.

  if (dbFile == null)
      dbFile = new FileAdapter();
  if (dbFile.Status == FileAdapter.AdapterStatus.Closed)
  {
      dbFile.SetConnection( myAdgConnection );
      dbFile.FileName = fileName;
      dbFile.MemberName = memberName;
      dbFile.OpenNewAdgDataSet(out myDataSet);
  }