asp.net.ph

CommandType Enumeration

System.Data Namespace


Specifies how a command string is interpreted.

Members


Member Name Description
StoredProcedure The name of a stored procedure.
TableDirect A table name whose columns are all returned ( OLE DB .NET Data Provider only ).
Text An SQL text command ( default ).

Remarks

When the CommandType property is set to StoredProcedure, set the CommandText property to the name of the stored procedure. The command executes this stored procedure when you call ExecuteReader.

When the CommandType property is set to TableDirect, the CommandText property should be set to the name of the table or tables to be accessed. The user may be required to use escape character syntax or include qualifying characters if any of the tables named contain any special characters. All rows and columns of the named table or tables will be returned when you call one of the Execute methods.

In order to access multiple tables, use a comma delimited list, without spaces or padding, containing the names of the tables to access. When the CommandText property names multiple tables, a join of the specified tables is returned.

See Also

OleDbCommand Class   SqlCommand Class Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph