Session.ExecuteNonQuery(String, Object[]) Method
Executes the specified SQL statement and returns the number of rows affected.
Namespace: DevExpress.Xpo
Assembly: DevExpress.Xpo.v18.2.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
sql | String | A String value that specifies a parameterized SQL query. |
parameterValues | Object[] | An array of objects specifying parameters to pass to the database server along with the query. |
Returns
Type | Description |
---|---|
Int32 | The number of rows affected by the executed SQL statement. |
Remarks
Use ExecuteNonQuery to execute SQL statements that do not produce result sets, such as UPDATE, INSERT, and DELETE statements.
To learn more about executing SQL statements in XPO, refer to Direct SQL Queries.
Note
The ExecuteNonQuery method sends statements directly, so the correct statement syntax depends on a particular database server.
See Also