Tip Bank

DevX - Software Development Resource

Specify the Order By Clause in a View

SQL Server does not allow you to include the Order By clause in a view.To do this, consider using the following workaround: USE pubsGOCREATE VIEW AuthorsByNameASSELECT TOP 100 PERCENT *FROM

DevX - Software Development Resource

Using Quotation Marks in SQL Server

The standard delimiters for literal strings in SQL are single quotation marks (‘). By default, SQL Server reserves double quotation marks (“) as delimiters for database objects.The SQL Server ODBC

DevX - Software Development Resource

Avoid NullPointerException Comparing Strings

The standard way to compare a variable String to a constant is to use this syntax: if(myString.equals(“test”)){ doSomething();} However, if myString is null, a NullPointerException will be thrown. Instead, use:

DevX - Software Development Resource

Exceptions are Objects

When a class designer believes that an exceptional condition is recoverable, the checked exception should be thrown. But, many programmers (and I am guilty of this as well) tend to

DevX - Software Development Resource

Get Browser Information

Sometimes, you need to find the Browser in which an applet is loaded. This small bit of code can do the job: public void getBrowserInfo(){ String vendor = System.getProperty(“java.vendor.url”).toLowerCase(); browser

DevX - Software Development Resource

Support COM+ constructor strings in serviced components

Having a VB6 component support a COM+ construction string requires that you implement the IObjectConstruct interface and its only method, Construct. The .NET ServicedComponent class implements this interface internally and

DevX - Software Development Resource

Disable COM+ 1.5 applications and components

COM+ 1.5 (provided with Windows XP) has an interesting feature that is missing in COM+ 1.0: the ability to disable entire COM+ applications or just their individual components. You can