AdgDataSet.AddRow Method
Estimated reading time: 2 minutes
Definition
Namespace: ASNA.DataGate.Client
Assembly: ASNA.QSys.DataGate.Client.dll
Adds a new row to the DataTable associated with the specified format.
Overloads
| Signature | Description |
|---|---|
| AddRow(String) | Adds a new row to the DataTable associated with the specified format name. |
| AddRow(Int32) | Adds a new row to the DataTable associated with the specified format index. |
void AddRow(String)
Adds a new row to the DataTable associated with the specified format name.
void AddRow(string strFormat)
Parameters
| Type | Parameter name | Description |
|---|---|---|
| String | strFormat | The format name of the DataTable. |
Remarks
This method first calls GetFormatIndex with the provided format name to retrieve the corresponding format index, then calls AddRow with the retrieved format index to add a new row.
AddRow appends a prepared row to the table specified by strFormat. A prepared row can be created, or an existing DataRow can be set as a prepared row, using one of the PrepareRow methods of AdgDataSet.
The usual pattern of use involves first staging the prepared DataRow object via PrepareRow , setting the field values in the DataRow as necessary, then calling AddRow or AddPreparedRowAndSetActive to append the row to the table.
Note that prior to calling this method, you must call PrepareRow to stage a prepared row for insertion to the table. Also, upon return from this method, the prepared row of the table remains the row added to the table. Calling AddRow or AddPreparedRowAndSetActive again before calling PrepareRow will cause an exception.
void AddRow(Int32)
Adds a new row to the DataTable associated with the specified format index.
void AddRow(int iFormat)
Parameters
| Type | Parameter name | Description |
|---|---|---|
| Int32 | iFormat | The format index of the DataTable. |
Remarks
AddRow appends a prepared row to the table specified by iFormat. A prepared row can be created, or an existing DataRow can be set as a prepared row, using one of the PrepareRow methods of AdgDataSet.
The usual pattern of use involves first staging the prepared DataRow object via PrepareRow , setting the field values in the DataRow as necessary, then calling AddRow or AddPreparedRowAndSetActive to append the row to the table.
Note that prior to calling this method, you must call PrepareRow to stage a prepared row for insertion to the table. Also, upon return from this method, the prepared row of the table remains the row added to the table. Calling AddRow or AddPreparedRowAndSetActive again before calling PrepareRow will cause an exception.