devxlogo

Tip Bank

IIF Command in SQL Server

There is no “IIF” function in SQLSERVER as of VB and Access.For example, say you had a table like this: StudID Subject Marks—— —— ——1 Maths 801 Physics 751 Chemistry

Use ASP in your .js, .vb, and .css Files

Open Internet Services Manager from the Administrative Tools group.Right-click on your server and select properties. From Master Properties choose WWW Services and click the “Edit…” button. Select the HomeDirectory, and

String Comparing

Suppose that you have the following code: String strObj; if(strObj != null) if(strObj.equals(“something”)){ // } You can use instead “something”.equals(strObj), so you don’t have to test if strObj is null.

Speed up searches with hash tables

You probably know that there are basically two methods to search a value in an array: the brute force approach (i.e. linear searching) and the binary search. Both of them

Converting ResultSet to XML

Oftentimes, we need to convert ResultSets to XML for transferring data across different applications. Here is very simple code that transforms ResultSets into XML. import java.sql.*;import java.io.*;public class XMLWriter{ public

Get Nasdaq Quotes Online in your Java Program

This is a piece of my actual code. It’s rather self-explanatory. public static String quote(String symbol) { try { java.net.URL url = new java.net.URL( “http://quotes.nasdaq.com/quote.dll?page=_xml&mode=stock&symbol=” + symbol); com.borland.xml.XmlData data =

Test if a Character in a String is a Letter

There is a simple way to test if a character in a string is a letter.Just by using the UCase() And LCase() functions. Public Function IsLetter(Char As String) As Boolean