devxlogo

The Latest

Finalization and Cleanup

Although Java does not provide a destructor as in C++, you can use an overridden finalize() method for similar purposes. The overridden finalize() method is invoked on an object before

Constants in Java

Even though Java does not have a constant type, you can achieve the same effect by declaring and initializing variables that are static, public, and final. After the variables have

Interoperable Dates and Times in SQL Queries

Many developers using ODBC, JDBC, OLE DB, and ADO are unaware that there is a standards-compliant solution for expressing dates, times, and timestamps in SQL statements. When writing queries in

ODBC and JDBC Compliance

“ODBC-compliant database” and “JDBC-compliant database” are nonsequiturs. ODBC and JDBC clients can connect to databases that store behavior in the form of methods, triggers, constraints, and stored procedures. The ODBC

Starting NT Services for SQL Databases

The Windows NT installation process for SQL servers from Oracle, Microsoft, IBM, Sybase, and Informix installs NT services. Not all products include a graphical tool that enables you to start

Make HTML File Management Easier

This tip works equally well in both the Windows NT and Windows 95 browsers, and makes managing HTML files a bit easier by adding some file-type specific menu items to

Namespaces do not Incur Additional Overhead

Namespaces do not incur runtime or memory overhead. The technique used to represent namespaces is called name mangling. This same technique is used to create unique names for overloaded functions

Put an Ampersand (&) in a Menu or Command Button

When creating menus and command buttons, use the ampersand symbol to create a shortcut key for that option. For example, you might use “&Cancel” for a command button with a

Place a Variable-Length String in Text

VB doesn’t have a function to replace part of a string (of n-length) with another string (of x-length). The Mid() statement works only with target and replacement strings of the

Add Columns to a Standard VB List Box

Use the Win32 API to set tab stops in a Visual Basic list box by creating these declarations and routine in a module: Public Const LB_SETTABSTOPS = &H192Declare Function SendMessage

Force Uppercase Characters in a Text Box

To change text in a text box to uppercase as soon as the user types it in, use this code: Private Sub txtname_KeyPress(KeyAscii As Integer) ‘Puts in uppercase as soon

Register ActiveX Components Manually

Not all ActiveX DLL and OCX files include installation programs to properly register the control. You need to run REGSVR32.EXE manually to perform the registration. You can save time by

Destroying Collections’ Items

Many programmers mistakenly believe they can remove all the items from a collection by setting the collection itself to Nothing: Dim children as New Collection…Set children = Nothing This technique

Invalid File Pointer, Exception EAccess Violation

Question: I have developed an application in Delphi 3.0 Client/Server Suite. It reads and validates records from an Access 95 database and then writes to AS400. The software processes 606

Win API

Question: Is there a way under Delphi 3 and 4 to determine if a previous instance of the application is already running? Answer: Yes, there is a way to determine

Writing to Paradox Tables With Delphi

Question: I am unable to post records permanently to Paradox tables using Delphi 3. The records appear in the table object but disappear after I exit Delphi and start another

Radio Button

Question: How can I make the contents of a table change when the user selects a different radio button? Just like “Button” input type has an event called “onClick,” is

ASP InterDev problem with filter

Question: Hello from France,I’m on Windows NT4.0 with SQL Server 6.5and Visual Interdev. I use the DataForm wizard to connect to a data base. When I’m on the xxxxlist.asp with

Migrate Access97 Apps with InterDev

Question: I am trying to migrate an Access97 database application to a Web-based application. I bought InterDev because it purportedly makes this process easy. But I cannot create a form

Customize VI6 DTC

Question: I know how to use the new RecordSet control from VI6 to display records into a Grid; but how do I implement a query at runtime? For example: SQL

Why Use Inner Classes?

Inner classes often make your programming task easier by eliminating the requirement to write parameterized constructors for your classes and to pass references as parameters. A method in an inner

RDS Custom DataFactory in IE4

Sometimes it’s necessary to create your own RDS server object because of some inherent limitations of the built-in RDSServer.DataFactory object. If you find it necessary to build your own version

Anonymous vs. Regular Inner Classes

Inner classes are useful for instantiating and registering listeners on event sources. When should you use an anonymous inner class and when should you use a regular inner class? If

Application Design and Passwords

Question: How do you protect an application with a password and store it in the application’s exe-file? Answer: You’d have to hard code the password in. Then in the FormCreate

SQL Joins with Paradox

Question: I’m developing a program that lists all of a shop’s clients and the items that they purchased. The problem is that if some clients haven’t bought anything, they don’t

Creating Radio Buttons Using the AWT

The way you create a set of radio buttons is significantly different between Swing and the AWT. With Swing, you instantiate the buttons and add them to a group object