TAILIEUCHUNG - Defining a Relationship Using Visual Studio .NET

Defining a Relationship Using Visual Studio .NET In this section, you'll see how to create a Windows application in Visual Studio .NET (VS .NET) | Defining a Relationship Using Visual Studio .NET In this section you ll see how to create a Windows application in Visual Studio .NET VS .NET with a DataSet containing two DataTable objects. These DataTable objects will reference the Customers and Orders database tables. You ll then learn how to define a relationship between the two DataTable objects in the XML schema. Create the Windows Application Perform the following steps to create the Windows application 1. Open VS .NET and select File New Project and create a new Windows Application. Enter the name of the project as DataRelation as shown in Figure . Figure Creating the Windows application 2. Click the OK button to continue. 3. Open Server Explorer and connect to the Northwind database using the connection you used in the previous chapters. You can open Server Explorer by selecting View Server Explorer. Expand the Tables node in the tree and select both the Customers and Orders tables by Ctrl left-clicking each table as shown in Figure . Figure Selecting both the Customers and Orders tables from Server Explorer 4. Drag the Customers and Orders tables to your form. VS .NET then creates three objects in the tray beneath your form. These objects are named sqlConnection1 used to access the Northwind database sqlDataAdapter1 used to handle access to the Customers table and sqlDataAdapter2 used to handle access to the Orders table . These objects are shown in Figure . Figure The new objects in the tray beneath the form 5. Next you need a DataSet object that contains DataTable objects to store the rows from the Customers and Orders tables. To create a DataSet object click your blank form and then click the Generate Dataset link at the bottom of the Properties window for the form shown earlier in Figure . This displays the Generate Dataset dialog box as shown in Figure . Leave all the settings in this dialog in their default state. Figure The Generate Dataset dialog box Notice

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.