Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
ASP .NET Database Programming Weekend Crash Course - J. Butler, T. Caudill.pdf
Скачиваний:
31
Добавлен:
24.05.2014
Размер:
3.32 Mб
Скачать

306

Sunday Afternoon

Listing 30-3

Continued

oRS.LockType= ADODB.LockTypeEnum.adLockOptimistic

oRS.Open (“Authors”,oConn,,, ADODB.CommandTypeEnum.adCmdTable)

If (oRS.BOF OR oRS.EOF) Then

Response.Write(“No records found”)

End If

Response.Write(“<H2>Using Early Binding</H2>”) if oRS.BOF and oRS.EOF then

Response.Write(“No Records”)

else

oRS.MoveFirst

Do While Not oRS.EOF Response.Write(oRS(“au_fname”).Value _

& “ “ & oRS(“au_lname”).Value & “<br>”) oRS.MoveNext

Loop

Response.Write(“<p>End of RecordSet</p>”) end if

%>

</BODY>

</HTML>

REVIEW

We covered how to adapt your existing ADO code to operate in ASP.NET, summarized the key differences between the features of ADO and ADO.NET, and discussed how to take advantage of early binding of COM objects. These are some of the major alternatives you should consider when you start migrating code to the .NET Framework.

QUIZ YOURSELF

1.What utility provides the ability to early bind COM objects in the .NET Framework? (See “Early Binding ADO COM Objects in ASP.NET.”)

2.What are two major advantages of early binding? (See “Running ADO under ASP.NET.”)

3.List two syntax differences between ASP and ASP.NET. (See “Running ADO under ASP.NET.”)

P A R T

VI

Sunday Afternoon

Part Review

The following set of questions is designed to provide you with feedback on how well you understood the topics covered during this part of the book. Please refer to Appendix A for the answers to each question.

1.SOAP is a Microsoft proprietary standard. True/False

2.SOAP-encapsulated data can freely transport across corporate firewalls. True/False

3.List two examples of commercial applications implementing SOAP.

_______________________________________________________

_______________________________________________________

4.Which language can support SOAP?

a.VB

b.Java

c.COBOL

d.All of the above

5.Microsoft’s Web Services are based on HTTP and HTML. True/False

308

Part VI–Sunday Afternoon Part Review

6.Which of the following file extensions is used for a Web Service? a. .aspx

b. .ascx c. .asmx d. .ws

7.Fill in the blank: The ______ attribute needs to be added to VB method to make it Web-callable.

8.Fill in the blank: A ______ document is a “communication contract” that describes a Web Service.

9.In ASP.NET you can combine VB .NET and C# on the same page. True/False

10.Theoretically, VB .NET performs less efficiently than C# in ASP.NET. True/False

11.The CLR has been designed to replace the existing runtime layers of COM, Microsoft Transaction Services (MTS), and COM+.

True/False

12.Set statements are supported in VB .NET. True/False

13.Multiple DataTable objects can be stored in one DataSet. True/False

14.Late binding provides better overall compiled performance than early binding.

True/False

15.It is possible to execute unmanaged ADO under ASP.NET. True/False

16.The tlbimp.exe utility must be used to support early binding of unmanaged code.

True/False