devxlogo

Tip Bank

Retrieving Drive Names

To retrieve drive names from a system, use the static method listRoots in java.io.File package. It will return the all-available drive present in the system. This method will be useful

Using Addbatch and Executebatch

If you insert/update/delete multiple times to the database, you canimprove performance by using the addbatch and executebatch methods of statement objects. One drawback about using this method is that it

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

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

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