devxlogo

Tip Bank

Modifying Layout on Multiple Platforms

You can use the Toolkit’s getScreenSize().width to recompute the size of a component at run time. For example, if you have a Frame that is supposed to have the screen’s

Using NULL in a Query’s Where Clause

While comparing a field to NULL, a SQL query should use the IS operator in place of the “=” operator. The reason is that if the ANSI_NULLS option is On

The Order of Destructors’ Call

An object’s destructor invokes the destructors of its direct base classes and member objects. The invocation occurs in the reverse order of the construction of the subobjects. Note, however, that

Be Careful With Initializers in Constructors

You should use caution when automatically initializing class variables. In this example, C1 calls setVal() in its constructor, and C2, a subclass of C1, overrides the method to set a

Working With Collections

When working with collections, use an error handler to easily determine if a given key exists in the collection. If you try to access an item from a collection where

NT Scheduling

Question: How do I schedule to run my Exe automatically?When I schedule it, the exe does not run. Answer: First, for Command Scheduler to work consistently, the Schedule service must

Accessing 2 or More Databases

Question: How do I access more than one database (e.g., Oracle and Access) via a Powerbuilder application? I currently have ODBC drivers for both databases, but cannot access the required