Đang chuẩn bị liên kết để tải về tài liệu:
Microsoft ADO .NET 4 Step by Step - p 17

Không đóng trình duyệt đến khi xuất hiện nút TẢI XUỐNG

Lựa chọn báo cáo truy vấn SQL truy vấn dữ liệu trả về kết quả thao tác dữ liệu báo cáo số liệu báo cáo định nghĩa hỗ trợ các dữ liệu lưu trữ nội dung các thủ tục báo cáo rằng, sửa đổi hoặc thay đổi nội dung dữ liệu | In SQL Server databases the SQL language includes different types of statements including the following SQL query statements Selection queries that return data results Data manipulation statements Statements that modify or change data content Data definition statements Commands that modify tables and other structures that support the data content Stored procedures Named blocks of processing logic ADO.NET lets you process any of these statement types through instances of the System. Data.SqlClient.SqlCommand class. This class encapsulates one or more SQL statements and includes methods that request processing of the statement s on a SQL Server connection optionally returning query results. Note In the OLE DB provider the equivalent command class is located at System.Data. OleDb.OleDbCommand whereas the ODBC provider version is found at System.Data.Odbc. OdbcCommand. These two classes and the SqlCommand class in the SQL Server provider all derive from System.Data.Common.DbCommand. Creating Command Objects Using the SqlCommand class is a straightforward procedure 1. Create an instance of SqlCommand. 2. Assign a valid SQL statement to the object s CommandText property. 3. Set the object s Connection property to an open SqlConnection instance. 4. Assign other optional properties as needed. 5. Call one of the object s many synchronous or asynchronous execute methods. The SqlCommand object s constructor has various overloaded versions that let you specify the SQL statement text and the ADO.NET connection as arguments. 136 Chapter 9 Querying Databases 137 C SqlConnection linkToDB new SqlConnection connectionString linkToDB.OpenO string sqlText @ UPDATE WorkTable SET ProcessedOn GETDATE WHERE ProcessedOn IS NULL SqlCommand dataAction new SqlCommand sqlText linkToDB Visual Basic Dim linkToDB As New SqlConnection connectionString linkToDB.Open Dim sqlText As String UPDATE WorkTable SET ProcessedOn GETDATE WHERE ProcessedOn IS NULL Dim dataAction As New SqlCommand sqlText .

Đã 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.