Listing 11-2: Sample VB .NET Code Demonstrating the Use of ADO.NET
Listing 11-3: COBOL .NET Sample Code Demonstrating the Use of ADO.NET
Chapter 12: XML in a Managed Environment
Listing 12-1: A Partial Class Viewer Display of the System.Data.Dataset Class
Listing 12-2: Formatted XML
Listing 12-3: A COBOL .NET Sample Project Demonstrating the Use of the ADO.NET Dataset
Listing 12-4: Sample Code from the ReadWriteXMLDatasetExampleVB Project
Listing 12-5: Pseudo-Code Snippet Showing What a COBOL Copybook Might Look Like for the Northwind.Customers Sample SQL Server Table
Listing 12-6: XML Schema for the Northwind.Customers Sample SQL Server Table
Chapter 13: Windows Forms, Web Forms, and No Forms
Listing 13-1: Code Snippet from MyFirstWinFormCobol Showing the Setting of the TextBox1 Text Property
Listing 13-2: A Partial List of the Classes Deriving Directly and Indirectly from the System.Windows.Forms.Control Base Class
Listing 13-3: A Partial Listing of System.ComponentModel.Component's Derived Classes
Listing 13-4: Code Snippets from the WebApplicationSampleCobol Project's WebForm1.aspx.cob File
Listing 13-5: Contents of the WebApplicationSampleCobol Project's WebForm1.aspx File
Listing 13-6: Code from the WebApplicationSampleVBl Project's WebForm1.aspx.vb File
Listing 13-7: The Hierarchy of Classes (ASP.NET Server Controls) Derived from the System.Web.UI.Control Base Class
Listing 13-8: Code Snippets of the Built-in "Hello, World" Sample Web Services
Chapter 14: Adding Value to Your Interface
Listing 14-1: Code Snippets from the Sample Application MyInformativeWinFormCobol
Listing 14-2: A Code Snippet from the Sample Application MyInformativeWinFormVB
Listing 14-3: Code Snippet from the MyInformativeWinFormVB Project Showing the Timer Control Being Used
Listing 14-4: A Code Snippet from the MyWebUseValidationCobol Sample
Listing 14-5: The HTML Generated on Behalf of the Label
Listing 14-6: The HTML Generated As a Result of Placing Each Validation Server Control on the Web Form
Chapter 15: Managing Cache and State for ASP.NET
Listing 15-1: Creating and Passing a QueryString in VB .NET
Listing 15-2: Retrieving a Passed QueryString in VB .NET
Listing 15-3: Creating and Passing a QueryString in COBOL .NET
Listing 15-4: Retrieving a Passed QueryString in COBOL .NET
Listing 15-5: Creating a Persistent Cookie in VB .NET
Listing 15-6: Retrieving a Persistent Cookie in VB .NET
Listing 15-7: Creating a Persistent Cookie in COBOL .NET
Listing 15-8: Retrieving a Persistent Cookie in COBOL.NET
Listing 15-9: Populating a Hidden Forms Field in VB .NET
Listing 15-10: Retrieving a Hidden Forms Field in VB.NET
Listing 15-11: Populating a Hidden Forms Field in COBOL .NET
Listing 15-12: Retrieving a Hidden Forms Field in COBOL.NET
Listing 15-13: The Hidden Control HMTL Generated to Support ViewState
Listing 15-14: Populating View State in VB .NET
Listing 15-15: Retrieving View State in VB.NET
Listing 15-16: Populating View State in COBOL .NET
Listing 15-17: Retrieving View State in COBOL.NET
Listing 15-18: Updating the Application Class in the Global.asax File in VB .NET
Listing 15-19: Retrieving the Application Class in VB .NET
Listing 15-20: Updating the Application Class in the Global.asax File in COBOL .NET
Listing 15-21: Retrieving the Application Class in COBOL .NET
Listing 15-22: Updating the Application Cache Class in VB .NET
Listing 15-23: Retrieving the Application Cache Class in VB .NET
Listing 15-24: Updating the Application Cache Class in COBOL .NET
Listing 15-25: Retrieving the Application Cache Class in COBOL .NET
Listing 15-26: Updating the Session State Class Inside the Global.asax File in VB .NET
Listing 15-27: Retrieving the Session State Class in VB .NET
Listing 15-28: Updating the Session State Class Inside the Global.asax File in COBOL .NET
Listing 15-29: Retrieving the Session State Class in COBOL .NET
Chapter 16: Reporting and Information Delivery
Listing 16-1: Code to Export a Crystal Reports ReportDocument in Microsoft Word (.doc) Format
Listing 16-2: Code to Export a Crystal Reports ReportDocument in Adobe Acrobat PDF (.pdf) Format
Listing 16-3: Code to Export a Crystal Reports ReportDocument in Microsoft Excel (.xls) Format
Listing 16-4: Sending E-mail Attachments with System.Web.Mail Managed Classes and SMTP
Chapter 18: Configuration for .NET Applications
Listing 18-1: . The Basic Syntax of Each .NET Directive
Listing 18-2: A Partial Listing of Attribute Classes That Derive Directly from the System.Attribute Class
Listing 18-3: Snippet from the ILDASM Output Showing the Extended Metadata for the AttributesExampleCobol Sample Application
Listing 18-4: Snippet from the ILDASM Output Showing the Extended Metadata for the AttributesExampleVB Sample Application
Listing 18-5: The CustomAttribute.vb Class Module from the ReflectionDemoVB.sln Sample Application
Listing 18-6: The DocumentedClass.vb Class Module from the ReflectionDemoVB.sln Sample Application
Listing 18-7: The ExampleElements.vb Class Module from the ReflectionDemoVB.sln Sample Application
Listing 18-8: The ReflectionDrillDown.vb Class Module from the ReflectionDemoVB.sln Sample Application
Listing 18-9: The ReflectionDriver.vb Class Module from the ReflectionDemoVB.sln Sample Application
Listing 18-10: A Portion of the Reflection Output As It Is Written to the Console Window for the ReflectionDemoVB Sample Application
Listing 18-11: Child Elements Available for <system.web></system.web>
Listing 18-12: The XML Schema for <appSettings></appSettings>
Listing 18-13: Using the System.Security.Policy.Evidence Class to Access Evidence Information from the Assembly
Listing 18-14: Reviewing the NamedPermissionSets Property
Listing 18-15: Retrieving the Code Groups per Policy Level
Listing 18-16: Executing the System.Security.SecurityManager.ResolvePolicy Method
Listing 18-17: The Permission Aggregate Result
Listing 18-18: The Imperative Approach to Programmatically Configuring Code Access Security
Chapter 19: Using Enterprise Services (COM+)
Listing 19-1: The MyFirstClassLibraryCobol Sample Code
Listing 19-2: Code from the MyFirstClassLibraryVB Sample Project
Listing 19-3: Assembly Attribute Code Used in the AssemblyInfo.vb File for MyFirstClassLibraryVB
Listing 19-4: The Available Attributes from the System.EnterpriseServices Namespace
Listing 19-5: Executing the Regsvcs.exe Command-Line Tool to Register the Serviced Component into COM+
Listing 19-6: The Content of the \bin\MyFirstClassLibraryVB.tlb File As Captured by the OLE/COM Object Viewer Tool
Listing 19-7: Code Snippet from the C:\MyFirstClassLibraryVB.reg File
Listing 19-8: Using the Regasm Tool to Create a Type Library File and Perform the Needed Windows Registry Update
Listing 19-9: The Client Application
Chapter 20: Developing for the Enterprise
Listing 20-1: Code Snippets from the MyMSMQExampleCOBOL Sample Application
Listing 20-2: Code Snippet Taken from the MyMSMQExampleVB Sample Application
Listing 20-3: Code Snippet from the MyMSMQAsyncAndTriggerCOBOL Sample Project
Listing 20-4: Code Snippet from MyMSMQAsyncAndTriggerVB
Listing 20-5: Code Snippet from MyMSMQAsyncAndTriggerVB Highlighting the Code Needed to Initiate Asynchronous Processing
Listing 20-6: The Form Class Constructor Method (New) of the MyThreadingExampleVB Sample Application
Listing 20-7: The Remaining Code from the MyThreadingExampleVB Sample Application
Listing 20-8: After Starting the MyThreadingExampleVB Sample Application, the Information As Written to the TextBox Control Before the Worker Thread Is Started
Listing 20-9: After Starting the Worker Thread, Additional Information Is Captured from the TextBox Control
Appendix B: A Sharp Primer: C# and J#
Listing B-1: Code Snippet from the MyFirstCSharpApplication Sample Application
Listing B-2: Code Snippet from MyFirstCSharpApplication Showing the Procedures DefineDataTypesSample and LogicSample
Listing B-3: The MyFirstJSharpApplication Sample Application