FileAdapter.AddRecord Method

Estimated reading time: 3 minutes

Definition

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

Add a record to a file.

Overloads

Signature Description
AddRecord( AdgDataSet) Adds a record to the file using the provided AdgDataSet.
AddRecord( XmlReader, AdgDataSet) Adds a record to the file using the provided XmlReader and AdgDataSet.
AddRecord( AdgDataSet, Char[ ]) Adds a record to the file using the provided AdgDataSet and application indicators.

void AddRecord(AdgDataSet)

Adds records to the file using the provided AdgDataSet.

void AddRecord(AdgDataSet ds)

Parameters

Type Parameter name Description
AdgDataSet ds The AdgDataSet containing the data for the new record.

Remarks

The AddRecord method is used to add a record to the file that the FileAdapter is working with. It first checks if the provided AdgDataSet is null. If it is, it throws an ArgumentNullException. It then calls the AddRecord method of the FileData object of the FileAdapter, passing the provided AdgDataSet. The AddRecord method of the FileData object adds a record to the file with the data from the AdgDataSet. The AdgDataSet should contain the data for the new record in its tables. The structure of the AdgDataSet should match the structure of the file that the FileAdapter is working with.

void AddRecord(XmlReader, AdgDataSet)

Add the records provided by an XmlReader to the file.

void AddRecord(XmlReader, AdgDataSet)

Parameters

Type Parameter name Description
XmlReader xr The XmlReader containing the data for the new record.
AdgDataSet ds The AdgDataSet containing the schema for the new record.

Remarks

The AddRecord method is used to add a record to the file that the FileAdapter is working with. It first checks if the provided AdgDataSet is null. If it is, it throws an ArgumentNullException. It then calls the AddRecord method of the FileData object of the FileAdapter, passing the provided XmlReader and AdgDataSet. The AddRecord method of the FileData object adds a record to the file with the data from the XmlReader, using the schema from the AdgDataSet. The XmlReader should contain the data for the new record in XML format. The AdgDataSet should contain the schema for the new record. The structure of the AdgDataSet should match the structure of the file that the FileAdapter is working with.

void AddRecord(AdgDataSet, Char[])

Adds a record to the file using the provided AdgDataSet and application indicators.

void AddRecord(AdgDataSet ds, Char[] appIndicators)

Parameters

Type Parameter name Description
AdgDataSet ds The AdgDataSet containing the data for the new record.
Char[] appIndicators The application indicators for the new record.

Remarks

The AddRecord method is used to add a record to the file that the FileAdapter is working with. It first checks if the provided AdgDataSet is null. If it is, it throws an ArgumentNullException. It then calls the AddRecord method of the FileData object of the FileAdapter, passing the provided AdgDataSet and application indicators. The AddRecord method of the FileData object adds a record to the file with the data from the AdgDataSet and the specified application indicators. The AdgDataSet should contain the data for the new record in its tables. The application indicators should be an array of characters that indicate the status of the application for the new record. The structure of the AdgDataSet should match the structure of the file that the FileAdapter is working with.

See Also

FileAdapter Class