QuickWatch Dialog Box

The QuickWatch window Figure 5-11 works closely with the Watch window. This dialog allows you to take a quick look at variables rather than adding them to the Watch window then later having to remove them. Figure 5-11 The QuickWatch dialog box. Figure 5-11 The QuickWatch dialog box. Before committing to using any variable in the Watch window, you can right-click the variable and select QuickWatch. From here, you can quickly evaluate the variable value, then decide whether or not to add it to...

Enterprise Services Checklist

Here is a quick and dirty checklist for building the WeddingList assembly to leverage Enterprise Services. The checklist effectively summarizes what you have already done. Use this checklist for future reference when creating new Serviced Components 1. Create a new class library project. 2. Add the appropriate classes and methods. 3. Organize your code using Regions 5. Region Business Level Logic 7. Public Function MyFunction As DataSet 13. Organize code in the middle tier to perform these...

Building a DataSet Table from Excel

Place the following code behind the btnBuildDataSetFromExcel click event. This will access your Excel document as if it were a database and populate the DataSet. From that point, the client application has no idea where the data came from, only that is exists in a format it understands. You will need to change the path to the Excel document to the path of your Excel document. Dim objConnection As OleDb.OleDbConnection Dim objCmd As OleDb.OleDbCommand Dim objDataAdapter As OleDb.OleDbDataAdapter...

NET Class Framework

The .NET Class Framework, also referred to as the .NET Base Classes, is a set of object models that provides easy access to base functionality thought a common namespace. All objects in this framework are accessible to all .NET languages. The .NET Class Framework provides a variety of base services divided among a variety of second-level namespaces under the System namespace. These second-level namespaces include base services such as data access, security, collections, XML, error handling, and...

DataAdapter Object Initialization

You are going to continue using the SQL Server data provider however, you may choose to utilize the OleDb data provider. The fully qualified names of the DataAdapter objects are System.Data.OleDb.OleDbDataAdapter As usual, verify that the appropriate namespace is imported Figure 9-4 The DataAdapter object within the ADO.NET model. Figure 9-4 The DataAdapter object within the ADO.NET model. The following code is not a working example of how to use the DataAdapter object however, the objects...

Creating the New SPDeleteContact Function

Dim strConn As String Data Source localhost Initial amp Catalog AddressBook User Id sa Pwd Dim objConn As New SqlConnection strConn Dim objParamID As New SqlParameter intID, SqlDbType.Int objParamID.Direction ParameterDirection.Input objParamID.Value CInt txtID.Text objCmd.CommandType CommandType.StoredProcedure objCmd.CommandText ab DeleteContact dsp objCmd.Parameters.Add objParamID objCmd.Connection objConn objCmd.Connection.Open

SelectedIndexChanged Function

To modify the SelectedIndexChanged function, follow these steps 1. Switch to the presentation design view and double-click on the DataGrid. This will bring up the SelectedIndexChanged function of the DataGrid. 2. Add the following code to the This function is executed when the Name link is selected at runtime. You will notice that some of the functions, for instance GetContactDetail strID , are not yet defined. Ignore this for now. If you still have functions that are not defined when this...