TAILIEUCHUNG - Creating a Sqldatareader Objec

Creating a SqlDataReader Object You can create a DataReader object only by calling the ExecuteReader() method of a Command object. Command objects were covered in the previous chapter. | Creating a SqlDataReader Object You can create a DataReader object only by calling the ExecuteReader method of a Command object. Command objects were covered in the previous chapter. For example the following code creates the required objects and executes a SELECT statement that retrieves the top five rows from the Products table of the SQL Server Northwind database storing the returned rows in a SqlDataReader object SqlConnection mySqlConnection new SqlConnection server localhost database Northwind uid sa pwd sa SqlCommand mySqlCommand SELECT TOP 5 ProductID ProductName UnitPrice UnitslnStock Discontinued FROM Products ORDER BY ProductID SqlDataReader productsSqlDataReader Notice that the SqlDataReader object returned by the ExecuteReader method is stored in the productsSqlDataReader object. You ll see how to use productsSqlDataReader in the following .

TÀI LIỆU LIÊN QUAN
10    127    1
6    150    1
7    127    1
5    125    1
6    127    1
6    115    1
6    122    1
6    174    1
7    122    1
5    97    1
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.