wwBusiness.Execute

This the core SQL execution method that returns a DataTable in a Dataset.

Use this method for any operations that require custom SQL. This method will use the internal Data member to retrieve the data from the backend and store it into a Table in the internal DataSet.

public int Execute( string Sql,
	string Tablename );

Return Value

0 or positive number: Number of records retrieved from the query. -1 Error.

Parameters

Sql
SQL Command String

Tablename
Name of the table in the internal DataSet that is created.


Example

// *** Inside of the business object
busCustomer Customer = new busCustomer();

if (Customer.Execute("select pk,company,lastname,first from " + Customer.Tablename + " order by Company where ");
Overloads:
public int Execute( IDbCommand SqlCommand, string Tablename );
public int Execute( string SqlCommand, string Tablename, IDbDataParameter[] Parameters );

See also:

Class wwBusiness


 Last Updated: 3/7/2007 | Send topic feedback