
Implement a Context Stack
Isolating the source of an error in a method containing many nested method calls can be difficult. If you haven’t written comprehensive error-handling code in every method and property you

Isolating the source of an error in a method containing many nested method calls can be difficult. If you haven’t written comprehensive error-handling code in every method and property you

In the following template member function, the parameter T can be a class or a built-in type: void vector< T >::resize (size_type new_size) { T val; // oops! What if

I’ve been working on a class module called clsDateInfo that returns various properties of a given date, and using it in some monthly trend graphs. I had to come up

An incomplete array declaration can appear in a function’s parameter list. For example: int count(const char s[]); The declaration of s doesn’t include the array’s size. Can count() use the

This useful code listing prevents users from entering duplicate entries into a listbox or modifying existing listbox entries. While the code prevents users from adding duplicate entries, you can modify

Recently, I turned to Windows messaging to manipulate certain dialogs by simulating button clicks programmatically. I looked through my API references and found only the WM_LBUTTONDOWN and WM_LBUTTONUP messages. I

Many VB programmers haven’t harnessed the power of VB6’s resource editor. They still use traditional LoadPicture or other primitive calls to load bitmaps and icons. Before VB5, loading pictures into

The type qualifiers const and volatile are idempotent. This means that if a type qualifier is included indirectly several times in a type specification (e.g., through a typedef or a

I’m developing a database system for a distant customer with a slow Internet connection. The system imports data and generates reports. The problem with importing and generating reports is that,

You can use Java to execute another program and display its output (via a BufferedReader). Here’s the code: import java.io.*;import java.util.ArrayList;public class ExecDemo{ static public String[] runCommand(String cmd) throws IOException

Previous versions of Internet Information Server (IIS) allowed an ASP page to include the contents of another file using code like this: With IIS 5.0, you can include the file

When you transfer files from Windows to the Macintosh, the files become DOS text files. This can be a problem if you convert movies to Java on a Windows computer

If you are porting code from C to Java it is often useful to be able to use the C pre-proccessor (cpp or cc -E). This tip shows you how

Under most circumstances, pressing the tab key within a JFC/Swing GUIapplication will cause the focus to shift from the currently focusedComponent to the next focus-traversable Component. This is not thecase,

To embed more than one applet in a single web page, put each applet in its own subfolder within the folder that contains the HTML document. Use the APPLET tag’s

Question: I want to extract/insert data by linking one Access table with a SQL server table through VB code. So far, I am not able to to it (using ADO

Question: I have two questions: 1. How do I make an EXE file without a interface (no form)? 2. How do I make that EXE file take arguments and how

Question: I am endeavoring to provide a graphical booking sheet metaphor (i.e. timeslots v. names) in an ActiveX Document. The third party grids I’ve tried, purchased and tested don’t allow

Question: I need to upgrade my Installshield, so I have been researching available products. Both Installshield and Wise (and others) seem to produce excellent installers. However now that the Windows

Question: What is the syntax for accessing a FoxPro 2.5 table using an ADO connectionstring? I want to be able use a DSN-less connection and access different tables depending on

Adding the Option Explicit line to an ASP file that is scripted in VB Script forces you to declare each of the variables that you use within your VB Script

While SQL Server uses 2049 as the cutoff year for interpreting dates, OLE Automation objects use the year 2030. To provide consistency in date values between SQL Server and client

In ASP, pairs are used to indicate a server-side script. It is a good idea to put this pair on the same line whenever possible. Because the ASP engine reads

Because the ASP engine reads and interprets every character in the file, adding comments in the ASP page increases the work of the IIS. Although the HTML page that is

It is a good idea to build a separate error-handling ASP page and call it from the code whenever it is required. Besides being a modular approach, it also improves

A common user scenario in a development environment is where the code typically opens a connection, executes a row or non-row returning command, processes results, and closes the connection. For

The File DSN usage should be avoided whenever possible. Instead, use System DSN; it is, on average, twice as fast. Also, File DSN is less secure because the database name,

SQL Trace can monitor, filter, and record all of the calls sent from the client applications to the server. It often reveals unexpected application overhead due to unnecessary calls to

RDO is an object interface that is closely tied to ODBC and is optimized for accessing SQL Server databases, especially from Visual Basic programs. It has little performance overhead on

ADO 2.0 includes few optimizations when it is marked as an Apartment model in the Registry. It determines the threading model from the Registry at DLL load time. The scaling