Đang chuẩn bị liên kết để tải về tài liệu:
Introducing Windows Azure- P52

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Introducing Windows Azure- P52:The cloud platform is getting more and more attractive to the computing world. Today, service-oriented architecture (SOA) and aspect-oriented programming (AOP) techniques are widely used in enterprise solutions. A question an IT management team or a software development team may ask is, what is the next trend going to be? Cloud computing seems to be the right answer. | CHAPTER 8 SQL AZURE Run the SQL script in Listing 8-5 to insert data into these two tables and run the script in Listing 8-6. You will see that the correct data is returned. Listing 8-5. Sample Data to Insert into the Tables Created Previously INSERT INTO UserTable Password FirstName LastName VALUES password Henry Li GO INSERT INTO UserTable Password FirstName LastName VALUES password Emma Li GO INSERT INTO UserTable Password FirstName LastName VALUES password David Kruger GO INSERT INTO Address UserID Addressl City State Zip County Emaill Email2 VALUES l l2 King Street Salem OR 97304 253 CHAPTER 8 SQL AZURE Polk yinghong@softnetsolution.net henry@softnetsolution.net GO INSERT INTO Address UserID Addressl City State Zip County Emaill Email2 VALUES 3 99 Universal Park Denver CO 80201 Denver david.kruger@example.com GO INSERT INTO Address UserID Address1 City State Zip County Email1 Email2 VALUES 2 19 West Ave Aberdeen WA 98520 Grays Harbor emma@example.com GO 254 CHAPTER 8 SQL AZURE Listing 8-6. Query Data with Joined Tables SELECT U.FirstName U.LastName A.Address1 A.City A.Email1 FROM UserTable U JOIN Address A ON A.UserID U.UserID WHERE U.LastName Li GO SELECT FROM UserTable SELECT FROM Address GO Now try to delete a record from UserTable using the highlighted code in Figure 8-11. An expected SQL exception will be thrown because the record is referenced by Address. This demonstrates that SQL Azure is truly a relational database service. delete UserTable where UserID 3 rrr Messages Msg 547 Level 16 State 0 Line 1 The DELETE statement conflicted with the REFERENCE constraint FK_Address_UserTable . The conflict occurre The statement has been terminated. Figure 8-11. An expected SQL exception is thrown when trying to delete a record from a referenced table Connect to a SQL Azure Database Using ADO.NET To connect to SQL Azure using ADO.NET is very similar to connecting to a traditional database. The difference is the connection string format. Let s take an example .

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