June 17, 1999

Fast Copy of Properties between Controls

You probably already know that if you select multiple controls on a form you can use the Property Window to change one of their common property in one single operation. However, here is a trick that is likely to be ignored by most programmer (included me, until recently). If you

Retrieve the list of SQL Server stored procedure

You can query SQL Server system tables to retrieve the list of all the stored procedure that are available for the end user and applications. The following routine extract their names and loads them in a DataGrid control: Dim cn As New ADODB.ConnectionDim rs As New ADODB.RecordsetDim connString As String,

Correctly restore mouse cursor

When you write lengthy procedures, it is a good habit to change the mouse cursor to an hourglass, and restore it to the original shape when the procedure exits. However, this cursor tracking may be rather difficult when the procedure has multiple exit points, or when it can exit abruptly

The “Assume No Aliasing” compiler option

A procedure is said to contain aliased values if it can refer to the same memory addresses in two or more distinct ways. A typical example is the following procedure: Dim g_GlobalVariable As Long…Sub ProcWithAliases(x As Long) x = x + 1 g_GlobalVariable = g_GlobalVariable + 1End Sub If this

Use Bookmarks to Reduce Scrolling in Visual InterDev 6

When you have a long HTML file to edit, scrolling up and down to your working areas can be a real pain. Fortunately, you can apply bookmarks to points in the code so that you can jump to them with keystrokes. Try this technique on a large HTML file. First,

MTS Does Not Support Components Implemented as EXE Files

Components that are implemented as executable files (EXE files) cannot execute in the Microsoft Transaction Server (MTS) runtime environment. The components need to be DLLs that are registered in MTS. Also, another limitation of MTS is that you can’t create MTS objects as part of an aggregation. In this respect,

Optimize Your Scripts in DHTML When Accessing a Collection

A typical operation in DHTML is to iterate through a collection of objects. Let’s say you’re writing an HTML application that indexes content. Your task is to collect all the H1 elements on a given page and to use them as index entries. Here’s an example of how you might

Return the Program Name for the Current Session in SQL Server

SQL Server 6.5 has an APP_NAME() function which returns the program name for the current session. This function is useful for tracking which client applications are running processes in SQL Server or for limiting access to specific applications. This built-in function returns the program name for the current session if

Vector vs. Array–the Best of Both Worlds

It’s often pointed out that the Vector class is expensive to use because all of the methods are synchronized. Java 2 has the LinkedList class, which can serve the same purpose without the performance penalty. In the meantime, however, there’s a simple approach you can take to one common use

No more posts to show