Concept Framework 1.0 documentation Contents | Index

ADODataSet.ExecuteNonQuery

Name Type Access Version Deprecated
ExecuteNonQuery function public version 1.0 no

Prototype:
function ExecuteNonQuery();


Description:
This function is similar to the ExecuteQuery function, but it returns no records. It executes the SQL query specified by the CommandText or PreparedQuery property, but it produces no results. This is suitable for "update", "insert" and "alter" queries. It's not recommended for using with "select" queries (because will produce no results).

Example:
		var Connection=new ADOConnection();

var DataSet=new ADODataSet(Connection);

// Check the Open member of the ADOConnection for connection strings
Connection.Open(CONNECTION_STRING);

DataSet.CommandText="delete from my_table where id=5";
DataSet.ExecuteNonQuery();

Returns:
Returns -1 if the connection is not set, 0 if couldn't execute the query or 1 if succeeded.

Documented by Eduard Suica, generation time: Thu Oct 15 20:01:58 2009 GMT(c)2009 RadGs Software