September 30, 1999

MTSTransactionMode in Visual Basic 6.0

Each MTS component can contain one or more classes which, in MTS terms, are referred to as MTS Objects. Visual Basic 6.0 provides a new property called MTSTransactionMode that can be used to set the transactional attribute for each class within the component. This property maps directly to the transaction

Get a Rough Estimate of Disk Space for Data and Indexes

sp_spaceused can be used to compute the amount of disk space used for data and indexes, and the disk space used by a table in the current database. If no table is given, then sp_spaceused reports on the space used by the entire current database. For example: sp_spaceused MyTable [,

Backup and Restore SQL Server Registry with Regrebld

If you make changes to the SQL Server Registry entries, then you should first back up those entries by using the Regrebld -backup command-line utility. Usage is: Regrebld -backup You can run this command from the Command Prompt. Regrebld with the backup parameter creates five files in the Mssql7Binn folder:

Start and Stop SQL Server 7.0 on Windows 98/95 With SCM.Exe Utility

If you are running the windows 98/95 version of SQL Server, then you can use the Windows 98/95 specific scm.exe utility to stop and start SQL Server. The scm.exe utility actually mimics Windows NT commands, such as net start and net stop for starting and stopping the services. For example,

Locate the Temp Folder

In your apps, do the right thing: Use the computer’s Temp folder to hold your temporary files. To find that location, paste this code into the Declarations section of a form: Private Declare Function GetTempPath Lib _ “kernel32” Alias “GetTempPathA” (ByVal _ nBufferLength As Long, ByVal lpBuffer As _ String)

Ask the Form Itself Whether it’s Loaded

Occasionally you initialize a form but don’t load it. You might do this to read in initial application Registry values. After that, any references to control properties on the form automatically cause your Form_Load event to fire, whether or not you intended to fire the Form_Load event. If you want

Catalog Your Graphics

I needed a printed catalog of GIF images in a directory. So I wrote a routine that creates a new document, and inserts an image for each GIF file in the directory, along with its name and size. When the routine has finished, you can print or save the document:

Perform Faster String Manipulations

Are you dealing with strings you have to parse if you want to drop one special character or change it into another? Keep this trick in mind. Even though this code seems to work fine, there is one minor problem that can cause headaches. The time you spend in memory

No more posts to show