The Latest

DevX - Software Development Resource

Manage Errors with Sparse Line Numbering

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

DevX - Software Development Resource

Make an Object Appear Like a Pointer

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

DevX - Software Development Resource

Spell Checker Add-In for VS.NET 2003

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.

DevX - Software Development Resource

BlobToFile – Saving a BLOB field to a file

‘ 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, _

DevX - Software Development Resource

FileToBlob – Loading a file into a SQL Server’s BLOB

‘ 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”,

DevX - Software Development Resource

Write a Primary Key Class in CMP EJB

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

DevX - Software Development Resource

Override Built-in Keywords

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

DevX - Software Development Resource

Automate Your Classic ASP Web Forms

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,

DevX - Software Development Resource

Get the Average Value Across the Columns by Using the AVG() Function

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

DevX - Software Development Resource

Compare Oracle and SQL Server Dates

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

DevX - Software Development Resource

JDO 2.0 Preview: Java Object Persistence Made Easy

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

DevX - Software Development Resource

Managing Objects’ Construction Order

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

DevX - Software Development Resource

From the Editor: Does Your Code Still Cut It?

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

DevX - Software Development Resource

Get Windows Name Using WMI

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

DevX - Software Development Resource

Sorting Null Fields Last

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