AddHandlerByName – Attaching to an object an event handler by name
‘ A generic routine that takes an object, an event name, and a list of potential’ delegates to event handlers, and selects the first delegate that matches the’ expected signature
‘ A generic routine that takes an object, an event name, and a list of potential’ delegates to event handlers, and selects the first delegate that matches the’ expected signature
‘ Reusable routine that loads a file into a SQL Server’s BLOB.’ Requires Imports for System.Data and System.Data.SqlClient’ (It supports only tables with one key field.)” Example:’ FileToBlob(cn, “pub_info”, “logo”,
‘ Reusable routine that save a BLOB field to a file’ Requires Imports for System.Data and System.Data.Common’ Example: BlobToFile(dr, 2, “c:xxxx.bmp”)Sub BlobToFile(ByVal dr As IDataReader, ByVal fieldIndex As Integer, _
‘ Create a suitable DataAdapter object for a given connection object.’ Requires Imports for System.Data, System.Data.Common, System.Data.OleDb,’ System.Data.SqlClient, System.Data.Odbc and System.Data.OracleClient” Example:’ Dim da As DbDataAdapter = CreateDataAdapter(“SELECT * FROM
‘ Create a suitable connection object for a given connection string.’ Requires Imports for System.Data, System.Data.Common, System.Data.OleDb,’ System.Data.SqlClient and System.Data.Odbc” Example: Dim cn As IDbConnection = CreateConnection(connStr)Function CreateConnection(ByVal connString As
‘ Create a suitable DataAdapter object for a given connection object.’ Example:’ Dim da As DbDataAdapter = CreateDataAdapter(cn, “SELECT * FROM Titles”)Function CreateDataAdapter(ByVal cn As IDbConnection, _ ByVal sql As
In the following example, the PurchaseOrderKey class implements a composite key for the PurchaseOrderEJB entity bean. The key is composed of two fields, productModel and vendorId, whose names must match
You can override some of the built-in VB keywords with your own version of the function. For instance, FileDateTime is a handy built-in function in VB, but it suffers from
When transforming XML to HTML you often have to create links on your page. Use this syntax to simply this task. Long way: Short way: