devxlogo

August 21, 2003

Handling Binary Files in Perl

For some reason, there exists a common misconception that there is no cross-platform, built-in way in Perl to handle binary files. The copy_file code snippet below illustrates that Perl handles

Insert an Image into a Database Using JDBC

//create the file object,//set the image to the statement object as//binary streamtry{ … File fileObject = new File(…); FileInputStream fisObject = new FileInputStream(fileObject); PreparedStatement pstmt = conn.prepareStatement(“insert into IMAGE_TABLE values

Code an Event Procedure for Each Textbox

If you want to code an event procedure (such as GotFocus) for each textbox on a freshly designed form, you must switch manually from the Change event to the GotFocus

Return Roman Numerals

This VB procedure returns decimal numbers (integers) as Roman numerals (a string), ranging from 1 to 4999. Numbers outside this range return the same number as a string. The optional