The Latest

DevX - Software Development Resource

Converting txt Files

Question: How can I import a delimited text file into a SQL Sever table? Answer: Welcome to the world of BCP. Included with SQL Server, the Bulk Copy Program will

DevX - Software Development Resource

Alwyas on Top

Question: How can you make your application “always on top,” just like the Windows clock application can? I use PB 4.0 and Windows 3.1. Answer: Use the SetPosition command to

DevX - Software Development Resource

Local External Functions

Question: Instead of distributing a user object (and its functions) as a PBD, I want to distribute it asa DLL (build runtime library, machine code),and then access its functionality in

DevX - Software Development Resource

Using ActiveX controls in PowerBuilder 6.0

Question: I would like to know how to find information(books, online documentation) on using ActiveXcontrols in PowerBuilder. Answer: I find the best way to learn how to use a new

DevX - Software Development Resource

Unmatched Query

Question: When one is working with large amounts of data, what is the quickest way of displaying rows not found when comparing two tables, without doing the following: SELECT table1.field1

DevX - Software Development Resource

Two lines of text in command buttons

Question: Is there a way to display the text on two lines with a command button in PowerBuilder 5? We have already tried the ~n. Answer: There is no way

DevX - Software Development Resource

Adding a JButton to the Cells of a Jtable

sing the Swing JTable class can quickly become a stickybusiness when you want to customize it to your specific needs. First you must become familiar with how the JTable class

DevX - Software Development Resource

The Trouble with Triggers, Part I

hat is a trigger? How does it work? When should one use them, and how does one debug them? Last, what are the enhancements that were made in SQL Server

DevX - Software Development Resource

Learn Control Array Bounds

You can use a control array’s UBound and LBound properties to determine how many controls are loaded. This code fills a string with the captions in the Label1 control array:

DevX - Software Development Resource

Right-Justify or Left-Justify Text

Use the Format$ function to produce right- or left-justified text: Format$(123, “@@@@@@”) gives ” 123″Format$(123, “!@@@@@@”) gives “123 ” Related Posts Adding Longs Without OverflowingAdjusting Views to Reduce Visibility of

DevX - Software Development Resource

Close Forms Uniformly

To close forms uniformly, treat the system menu’s Close command and your File menu’s Exit command in the same manner. In your Exit command, simply unload the form. Let the

DevX - Software Development Resource

Create a new Project Template

Upon initialization, the VB5 IDE presents you with a list of project types, such as Standard EXE or ActiveX EXE. You can also create new project types yourself by creating

DevX - Software Development Resource

Multiple Actions on One Event

To put two actions for one onmouseover=” ” event, just separate the two actions with a semicolon just like you would any two JavaScript statements. For example: OnChange=”alert(‘First Action’);alert(‘Second Action’)”

DevX - Software Development Resource

String Objects and C-strings: Caveats

The standard string class has a dual interface: it supports both C-style strings as well as string objects in various operations: const char text[] = “hello world”;string s = text;

DevX - Software Development Resource

Function Overloading

In order to overload a function, a different signature should be used for each overloaded version. A function signature consists of the list of types of its arguments as well

DevX - Software Development Resource

Pre-Defined Macros

All C/C++ compilers define the following macros: __DATE__ //a literal containing the compilation date in the form “Apr 13 1998″__TIME__ //a literal containing the compilation time in the form “10:01:07″__FILE__

DevX - Software Development Resource

Prefer dynamic_cast<> to typeid()

A robust, long lasting OO design relies on the premise that an existing class can be re-used in the future by means of derivation. Therefore, examining the actual type of

DevX - Software Development Resource

Simulating Inheritance of Assignment Operator

As opposed to base class’ constructor and destructor, which are automatically invoked from the derived class’ constructor and destructor respectively, a user-defined assignment operator defined in a base class is

DevX - Software Development Resource

<SPAN> Attribute in IE

Question: I’ve been working on completely redoing my company’s Web site for over a month and a half now. To help me out, I bought a book on HTML 4.0

DevX - Software Development Resource

C vs C++

Question: What is the main difference between Visual C and Visual C++ in Windows environments? Why would I want to use C++ instead? Is there any functional difference? Answer: Well,

DevX - Software Development Resource

Closing an application

Question: When I press the Close button on my app’s main form, the program appears to end. When I look at the Windows task list, however, my app is still

DevX - Software Development Resource

Saving Object to File

Question: Is it possible to save an object (in my case a collection) directly to a file, or must one extract the object’s properties and save each individually? Answer: Visual

DevX - Software Development Resource

Java interfaces and constructors

Question: Is there a way to force a specific constructor with an interface? Answer: No, there is no way to force implementors of a given interface to use constructors with

DevX - Software Development Resource

Java and Dual Monitor Unix Workstations

Question: I have a question regarding use of dual monitorUnix workstations to display Java screens.Specifically, can I display the mainscreen on onemonitor and the popup on another monitor? Answer: Within

DevX - Software Development Resource

InetAddress to String

Question: Is it possible to convert from java.net.InetAddress to string? Answer: Yes. Just call the InetAddress toString() method. Also, if you specifically want the host name, use getHostName. If you

DevX - Software Development Resource

Approach to studying C++

Question: My development background primarily involves COBOL and BASIC on UNIX platforms. I decided to further my language knowledge and branched out into C & C++. I’ve largely been teaching

DevX - Software Development Resource

Exception to String

Question: Given an exception, how do I convert the stack trace into a string? I want to capture the entire contents, the message and the trace, to a string. Answer:

DevX - Software Development Resource

Mandatory exception handling

Question: Why should some of the statements that might throw an exception be in try/catch block (otherwise the compiler reports a syntax error), and some need not be, even though