February 13, 2001

DevX - Software Development Resource

How to Compact Databases Using ADO

To compact MDB databases using ADO, just include a reference to the ‘Microsoft Jet and Replication Objects 2.6 Library’ (distributed with the MDAC 2.6 package) in your VB project. The

DevX - Software Development Resource

JTextfield For Digits Only

Subclass PlainDocument, then set the document of the JTextfield to the subclass as shown below: JTextField myJTextfield;myJTextfield.setDocument(new DigitsDocument());class DigitsDocument extends PlainDocument { public void insertString(int offs, String str, AttributeSet a)throws

DevX - Software Development Resource

Confining Your Mouse to a Form

With Modal forms there is a need to restrict the movement of the mouse to the form until user closes the form. This can be achieved by using the ClipCursor

DevX - Software Development Resource

A Fast Recordset Loop

Opening recordsets as ForwardOnly or ReadOnly makes them move faster between records. In addition, storing fields to variables before begining the loop speeds up field access. Example: * Create a

DevX - Software Development Resource

Problems With Using Duplicate Variables

Most beginners accidentally declare duplicate variables of different data types or of the same data types. The following illustrates this: class Duplicate{ String data; private void fun() { String data=