December 22, 2001

Fill a Combo with Available Drive Letters

To create a drop-down control with a list of used or unused drive letters, place two ComboBox controls on a form, named Combo1 and Combo2, and include this code to initialize the lists: Private Declare Function GetLogicalDrives Lib _”kernel32″ () As LongPrivate Sub Form_Load()FillCombo Combo1, TrueFillCombo Combo2, FalseEnd SubPrivate Sub

Don’t Create a Recordset Unless It’s Required

When running action queries make sure you add the adExecuteNoRecords option, so that a recordset is not created. You can also use this technique in lookup situations when returning just a single row with one or two fields (ID values for example). In this case a stored procedure and outparameter

Float Buttons Over Tab Panels

When using the SSTab control to build a tabbed dialog, I often find the design more pleasing when the OK/Cancel buttons or other controls appear on every tab. It

Create Folders Recursively if They Do Not Exist

This script can be used in ASP or VBScript or Visual Basic. It is an easy way to create a folder tree. Sub CreateFolderTree(ByVal FolderName) Dim objFSO Dim InterminPath Dim Loc Dim bCreateFolder Dim sName sName = FolderName bCreateFolder = False Set objFSO = CreateObject(“Scripting.FileSystemObject”) ‘Create folders recursively if they

Using the java.util.Properties Object to Decouple Applications

Assume that you have a set of classes that need to provide the same functionality but the way they provide it is different. In essence, these are the classes that implement the same interface.The problem lies in writing the logic to decide which of these class to instantiate at runtime.

Using the GO Command in SQL Server Query Analyzer (T-SQL)

The GO Command sends the current batch of Transact-SQL statements to SQL Server as a batch. The current batch of statements is composed of all those statements entered since the last GO. They are compiled into a single execution plan. If two statements are running in SQL Server Query Analyzer,

No more posts to show