March 28, 2000

Valid Date Range for SQL Server Date/Time Data Types

Values for datetime data types earlier than January 1, 1753 are not permitted in SQL Server. SQL Server rejects all values that do not fall within the range from 1753 to 9999. Another SQL Server data type, smalldatetime, stores dates and times of day with less precision than datetime datatype.

Getting Around Global Variables

In many programming languages such as C or Pascal,most users have come across global variables.Like this C example: int GlobVar = 0; // Global variable void f(int x) // Function to change variable. { GlobVar = x; } Java does not have such variables. However, there is a simple way

Be Careful When You Cast

Java allows you to cast variables, or change them from one variable type to another. However, it’s important to make sure that the final variable type can store all the information from the original variable type, as Java will discard any additional information. For example, if you cast a variable

Resolution of Overloaded Functions

Let’s say we have an overloaded function called fun(): void fun(string) { system.out.println(“String”); }void fun(int) { system.out.println(“Int”); }void fun(double) { system.out.println(“Double”); }void fun(float) { system.out.println(“float”); } If we call fun(37) how does the system choose which function toexecute? Basically it chooses based on type conversions.The parameter 37 is an [int]eger

Handling Complex Initialization

Complex initializations need only be done once and the result stored for later use. For example if you need to create a list of integer values and then load them, you can create a class that stores the information and then load it as follows. Be sure that the resource

Take Applications Global Using J++ 6.0’s Localization Feature

Use J++ 6.0’s Localization feature to provide several language versions of your application. This new feature allows you to create separate resource files for every form in your application, and for every language in use. If you use the required naming convention for these files, your user’s computer will select

Internationalization and Formatting numbers

You can consider Java to be a strong language with respect to internationalization and number formatting. Sometimes you might wish to format numbers in a specific locale or given a certain number of digits. Two classes help in this case: NumberFormat and DecimalFormat. For example, to format a specific number

Use Conditional Compilation for Debugging J++ 6.0 Applications

The J++ 6.0 includes the ability to do conditional compilation, a mechanism for debugging code. J++’s conditional compilation allows you to include or exclude entire blocks of code at run time using the conditional directives #if, #else, #endif, #define, and #undef. Here’s an example of how conditional directives work: #define

Display Integers Without Commas in JTables

If you have a JTable where the values displayed in a particular columnare Integer objects, it will display the Integer values with commas(e.g. 98765432 is displayed as 98,765,432) if these two conditions aretrue: 1. The getColumnClass(int columnIndex) method of the JTable’sTableModel returns Integer.class for the column in which the Integerobjects

No more posts to show