PreviousNext
Help > Easycom .NET > System.Data.EasycomClient namespace > EacCommand > EacCommand properties > EacCommand.CommandType
EacCommand.CommandType

 

public System.Data.CommandType CommandType [ get, set ]

 

This property designates the type of request the command object is representing.

The possible values are:

     Text (default): Any SQL query. Can be "SELECT " or another SQL query. The EacCommand.CommandText must contain the SQL text of the query.

The syntax must be AS/400 SQL compliant. The parameters must be specified with the ':NAME' syntax. For example:

 

cmd.CommandText="SELECT * FROM S_CUSTOMERS WHERE CUST_ID = :PCUSTID"

(so the parameter name is PCUSTID)

     StoredProcedure : an SQL or an Easycom stored procedure. The EacCommandText must contain the procedure name only. It can be:

o    *PGM/PROC if the procedure is an Easycom procedure (see 'Easycom Stored Procedure configuration' to define an Easycom Stored Procedure).

o    LIB/PROC or PROC if the procedure is an SQL stored procedure.

     TableDirect : a physical, or logical file. The CommandText value must contain the name of the file, like LIB/FILE or FILE or LIB/FILE(MEMBER) or FILE(MEMBER).