TAILIEUCHUNG - The SqlCommand Class

The SqlCommand Class You use an object of the SqlCommand class to execute a command against a SQL Server database | The SqlCommand Class You use an object of the SqlCommand class to execute a command against a SQL Server database an object of the OleDbCommand class to execute a command against any database that supports OLE DB such as Oracle or Access and an object of the OdbcCommand class to execute a command against any database that supports ODBC. Table shows some of the SqlCommand properties. Table shows some of the SqlCommand methods. You ll learn how to use some of these properties and methods in this chapter. Table SqlCommand PROPERTIES PROPERTY TYPE DESCRIPTION CommandText string Gets or sets the SQL statement stored procedure call or table to retrieve from. CommandTimeout int Gets or sets the number of seconds to wait before ending an attempt to execute the command. The default is 30 seconds. CommandType CommandType Gets or sets a value that indicates how the CommandText property is to be interpreted. Valid values are CommandType .StoredProcedure and CommandType .TableDirect. Text indicates the command is a SQL statement. StoredProcedure indicates the command is a stored procedure call. TableDirect indicates the name of a table for which all rows and columns are to be retrieved. The default is Text. Connection string Gets the name of the database connection. DesignTimeVisible bool Gets or sets a Boolean value that indicates whether the Command object is visible in a Windows Forms Designer control. The default is false. Parameters SqlParameterCollection Gets the parameters if any to supply to the command. When using a SqlConnection the parameters are stored in a SqlParameterCollection object. Transaction SqlTransaction Gets or sets the database transaction for the Table SqlCommand PROPERTIES PROPERTY TYPE DESCRIPTION command. UpdatedRowSource UpdateRowSource Gets or sets how the command results are to be applied to a DataRow object when the Update method of a DataAdapter object is called. Table SqlCommand METHODS METHOD RETURN TYPE .

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.