Tip Bank

DevX - Software Development Resource

Override Base Methods in a Form

If one class is inheriting from another class, a quick, easy way to find the available overrides is through .NET’s IntelliSense. Simply type “override” in a class and .NET will

DevX - Software Development Resource

JSP and the Introspection Process

The introspection process allows the JSP engine to populate a JavaBean with the values provided by a client through an HTML form. //when the names of the bean properties match

DevX - Software Development Resource

Execute a SQL Statement with Variable Parameters

When you need to execute the same SQL statement (in general an UPDATE) multiple times with different parameter values you can use the PrepareStatement method like this: Connection conn=null;PreparedStatement pst=null;String[]

DevX - Software Development Resource

Convert a java.util.Date Object to a java.sql.Date Object

The following code demonstrates how to convert a java.util.Date object to a java.sql.Date object: import java.sql.*;import java.util.*;public class cs{public static void main(String[] args) { GregorianCalendar date_1=(GregorianCalendar)Calendar.getInstance(); System.out.println(date_1.getTime()); java.sql.Date date_2= new

DevX - Software Development Resource

Using the SecureString Class

NET 2.0’s System.Security namespace includes the SecureString class, which lets you create encrypted strings and delete them from memory when they’re no longer needed. You can even make a string

DevX - Software Development Resource

Send Emails Through SMTP in .NET

When sending emails via SMTP in .NET, developers seldom check to ensure the SMTP service is installed and running. Here’s some code to perform the check and start the service

DevX - Software Development Resource

Compressing a File with MS Visual J# .NET

The Microsoft Visual J# .NET 1.1 Class Library (vjslib.dll) contains methods you can use to compress a file. The following code demonstrates how to use them. /* Code to zip