
Since 1998, DevX has helped people start businesses, build websites, and provide enterprise technology to people globally. Interviewing the likes of Microsoft’s co-founder, Steve Ballmer, the publication brings comprehensive, reliable, and accessible insights to the Internet.
You might have used line numbering to track error locations, but this technique can be a pain (and ugly) to use for every line. Sparse line numbers help you locate
When the TextMode property of a TextBox control is set to Password, the value you assign to the Text property (either declaratively or programmatically) isn’t actually displayed at runtime, not
‘ Select the specified items (passed as a comma delimited list) in the input ‘ List control (e.g. ListBox, CheckBoxList)’ ‘ Example:’ SetListSelections(CheckBoxList1, “item 3, item 5, item 6”)Sub SetListSelections(ByVal
‘ Return whether a file uploader control has posted a file to the serverFunction HasUploadedFile(ByVal fileCtl As _ System.Web.UI.HtmlControls.HtmlInputFile) As Boolean ‘ to return True the control’s PostedFile must be
‘ Return the HTML code generated by the input ASP.NET server control’ Note: the function only works with server side controls that don’t generate ‘ postbacks and that can be
‘ Show a client-side message box at the next page load’ Example:’ ShowMessageBox(Me, “Order successfully submitted!”)Sub ShowMessageBox(ByVal webPage As System.Web.UI.Page, ByVal message As String) ‘ replace ‘ with ‘, otherwise
‘ Return a comma delimited list of items selected in a List control (e.g. ‘ ListBox, CheckBoxList)” Example:’ Dim selections As String = GetListSelections(CheckBoxList1)Function GetListSelections(ByVal listCtl As _ System.Web.UI.WebControls.ListControl) As
I don’t know about you but when I think about writing applications I think about all of the things I want the application to do for myself or for the
You can make an object appear like a pointer with a smart pointer. If a class overloads the operator ->( ), then any object of that class can appear like
ava programmers who use JDBC may presume that the technology is restricted to interaction with database products such as IBM DB2 Universal Database, Informix, Oracle, or Microsoft SQL Server. This
ecently, I was working on the user interface for a tool to maintain an online catalog. Because the catalog featured so many products, it made sense to categorize them in
This Visual Studio 2003 add-in provides a multi-language spell checker for your comments and string literals. It uses a procedure similar to MS-Word but provides additional features useful for programmers.
‘ 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
‘ 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
‘ 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, _
‘ 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”,
‘ 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 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:
TML form handling consists of a set of named form controls on an HTML page and a Submit button for sending the information contained by the controls to a server,
CREATE TABLE tblSales (MonthNumber int,MonthName varchar(10) PRIMARY KEY,ProductA INT,ProductB INT,ProductC INT) INSERT INTO tblSales Select 1,’Jan’,5800,5900,5400 union allSelect 2,’Feb’,5750,5950,5500 union allSelect 3,’Mar’,6200,5700,7100 union allSelect 4,’Apr’,6300,5900,5400 union allSelect 5,’May’,5350,5650,5500 SELECT A.*,X.AvgSales
Oracle and SQL Server databases use different date/time resolutions, which poses a problem when you compare times from the two databases: The times will rarely be equal. Solve this problem
Windows applications generally use the registry for storing configuration information. Sometimes, it can be essential to allow users to change the registry key/value and the same needs to be reflected
he Java Data Objects (JDO) 1.0 specification, accepted in May 2002, was the first standard, data store-neutral specification designed specifically for Java object persistence. Java developers already had many persistence
n standard C++, the initialization order of objects with static storage type that are declared in separate translation units is unspecified. If, for instance, a constructor of object A takes
efore I turned 18 and graduated from high school, I can’t recall ever enjoying a quiz. But somehow these days I find them hard to resist. Whether they’re silly and
Here’s an easy way to get OS information using the Windows Management Instrument (WMI): Private Sub getWindowsInfo() On Error Resume Next Dim strComputername As String Dim objWMIService As Object Dim
If you sort a table from a field which has null values, Null values are typically displayed first. Here is a way to display the NULL values at last. Use











