
Since 1998, DevX has helped people start businesses, build websites, and provide enterprise technology to people globally. Interviewing the likes of Microsoft’s co-founder, Steve Ballmer, the publication brings comprehensive, reliable, and accessible insights to the Internet.

Let’s say you have a table like this: ID test– —-1 Hello1 Mr.1 Gates2 I2 am2 the best And you want a result group by each ID: 1 Hello Mr.

You will often need to verify the correct running of your code. While you can use the debug mode of an IDE or compiler, you can also include some debugging

Most of us have the tendency to write: String s1 = “Hello”;String s2 = “World”;String s3 = s1 + s2; However, the above is an expensive operation. As Strings are

I have problems developing applications for non-English


It would often be convenient to store multiple values in the Tag property. Here are two simple functions that help you do that. The first function stores the value in

If you use collections in your apps, you

Only in VB6 do the common controls OCX files provide an option to select a full line in a listview. In earlier versions, you can select a ListItem only by


After trapping an error in debug mode with the usual “On Error Goto ErrorHandlingCode”, you might be frustrated that you can

If you use dates in your program frequently and you want them to be in a particular format, you don

With VB6 came the ability to return arrays from functions. Returning an uninitialized array is a problem because there is no easy way?other than error-trapping?to find whether an array has

A few ActiveX controls, such as the Common Dialog Control, don

If you ever wondered how some DOS applications, such as Norton Utilities, calculate the estimated finishing time for a long process, here


The fast way to get multiple selected items from a ListBox control is to send it a LB_GETSELITEMS window message. Here


As the user types into a drop-down combo box, he or she passes keystrokes to the ComboIncrementalSearch routine, which then searches the combo box


The VB Integrated Development Environment (IDE) contains many toolbars and menu functions, and the functions you normally use are usually on different toolbars and menus, so most programmers have several

To optimize the If construct, separating testing conditions (“And” operator or “Or” operator) in different expressions can improve the performance. For example, don

To read a binary value from an input file stream (ifstream) object, use the read() member function. read() takes two parameters: char * and long, which hold the address of

It’s a good idea to parenthesize every macro argument. For example: #define MAX(x,y) (x)>(y)?(x):(y) The parentheses ensure that the macro is evaluated correctly, even if the user passes complex expressions

A polymorphic object has one or more virtual functions. When you serialize such an object to a file so that it can be reconstituted later, the deserialization might rewrite its

To write the binary value of a variable to an output file stream (ofstream) object, use the write() member function. write() takes two parameters: const char * and long, which

racle databases provide a powerful mechanism for enforcing business rules, called referential integrity (RI), which is implemented either via a declaration of foreign key (FK) constraints (“declarative RI”) or via

esigning a managed security solution (MSS) for your Web servers will cost you, but it doesn’t have to be money. Time and diligence are the only things you need to

‘ A class that creates UDL files for use as ADO Data Sources.’ Universal Data link files are handy for select data sources but there’ are lack of a way

To create a drop-down control with a list of used or unused drive letters, place two ComboBox controls on a form, named Combo1 and Combo2, and include this code to












