The Latest

DevX - Software Development Resource

Preprocessor Support

Question: Is there something similar to the C/C++ compiler directive #ifdef,#define, and #endif in Java? I would like to compiledebugging code conditionally. Answer: This is one of the first questions

DevX - Software Development Resource

Exception.what() Gives Vague Description

Question: I’m using a catch(exception e). When I come in the catch-block and print the message belonging to the exception, I receive the message “9exception.” What does it mean? Answer:

DevX - Software Development Resource

Return Values from Java to Unix

Question: I am calling a java program from a Unix script and passing threeparameters. Once the Java program is done, I want to return two valuesback to the Unix program

DevX - Software Development Resource

TextField Max Characters

Question: How do I restrict the number of characters to be entered in a TextField? Answer: Setting a maximum character count is not a built-in function ofTextField. You have to

DevX - Software Development Resource

Standard Input Exception

Question: Why do I have to catch an exception when I use System.in.read()? Answer: System.in is an InputStream, and like any InputStream, an I/O errormay occur when you read from

DevX - Software Development Resource

System Shutdown

Question: Is there an API that I can use to sense that the system is shutting down? Answer: Up until just recently the answer was no. But Sun keeps on

DevX - Software Development Resource

Change Task Print Layout

Question: How can I change the form used to print tasks? I would like it to print more than one line of notes. Answer: The standard form for printing a

DevX - Software Development Resource

Java Directory Guidelines

Question: Are there any guidelines for what the directory structure of a Java-based project should be? Answer: The only real guidelines govern the layout of your source code. Yourdirectories should

DevX - Software Development Resource

Date Conversion

Question: Can you point me at or come up with a generic class that allows date manipulation and storage without running into OS-specific or February 29 or Y2K issues? Answer:

DevX - Software Development Resource

HTML Pop-Up Menus Rendering Issues

Pop-up menus in normal HTML pages are usually implemented using Layers (DIV tag). However, the leading browser applications in the market have this known problem with layers: if a pop-up

DevX - Software Development Resource

Convert Form Collection into a String

You can convert the entire Request.Form collection into a single string variable just by referencing the collection without specifying the key or index.The format of the string would look like

DevX - Software Development Resource

XSL Editor

Question: I have seen a lot of XML editors coming out, and there are some that are very good. For me at least, developing the XSL has been more difficult

DevX - Software Development Resource

Error 208

Question: Error 208 appears regularly on my IBM RS6000 running Informix 7.3. The onconfig setting for shared mem is 0 ( no limit). What do I do about this? Answer:

DevX - Software Development Resource

Message Display While Page Loads

Question: I have an ASP application that retrieves several rows from a database using ADO. For those users who have a slower connection, I would like to know if there

DevX - Software Development Resource

SQL Version

Question: If my SQL Server has the following specs: 6.05.02 SQL-DMO6.50.252 DB-Library Which version do I have? And which service pack version do I have? Answer: If you want to

DevX - Software Development Resource

Concatening Columns Using AS

Question: I’m trying to retrieve the “firstname” and “lastname” fields from a SQL Server database, place them into a column called “fullname” using the AS statement. When I simply retrieve

DevX - Software Development Resource

Dynamic Table Name

Question: I would like to build a stored procedure that will receive a table name as a parameter. It then will select the data I want into whatever table name

DevX - Software Development Resource

E-mail in a Query

Question: How do I send an e-mail to myself if a field reads “SEND_MAIL?” For example, a user wants more info on a product, so he clicks on the Send

DevX - Software Development Resource

Create a New Table

Question: How do I create a new table? Answer: The DLL syntax for creating a table intuitively is the CREATE TABLE command. You can specify all the options for the

DevX - Software Development Resource

Use for sp_OAStop

Question: I noticed that MSDN contains sp_OAStop, which shuts down the OLE environment that starts inside SQL Server the first time you call sp_OACreate. But I can’t figure out what

DevX - Software Development Resource

Data Type

Question: How do I compare two values when one value(data type) is char and the other is an integer? Answer: For this you can use the CONVERT function. Since you

DevX - Software Development Resource

SQL Trouble

Question: I keep getting a syntax error on the last part of this statement: “SELECT DISTINCT [Company Name], [Street Address] FROM ” & d & ” WHERE[Street Address] !=” Maybe

DevX - Software Development Resource

Averaging Columns of Information

Question: How do I get the average of three columns for each row of a table that has four columns of information? Answer: Let’s say you have a table called

DevX - Software Development Resource

The MB Tray Control

This control lets you place an icon in the system tray area and associate it to your application. The icon can be static or animated, if you specify a series

DevX - Software Development Resource

Using out-process components under IIS4

By default IIS 4 doesn’t permit to use the Server.CreateObject command with an out-process ActiveX EXE component. To do so, you must manually create the AllowOutOfProcCmpts registry value under the