The Latest

DevX - Software Development Resource

Creating a “Browse for Folder” Dialog Box

Question: How can I create a “browse” facility in my application&#151something which throws up a dialog box that allows the user to view folders and select one, as in Microsoft

DevX - Software Development Resource

Declaring Data for an Object

Question: I’m trying to declare some data for an object such that, when necessary, other functions can use the object not only to perform member functions but also serve as

DevX - Software Development Resource

Maximum URL Length

Question: Is there a maximum URL length? One of my forms has a bunch of text fields on it so I am concerned that it might truncate when I pass

DevX - Software Development Resource

Numeric only TextField

Question: Is there is a way to create a text field that only accepts numeric input? Answer: There are probably a couple of a ways to go about doing this.

DevX - Software Development Resource

Prevent Certain Files From Being Bookmarked

Question: How can I prevent certain files on my site from being bookmarked? Answer: There is no way to fully prevent people from bookmarking a certain URL on your site.

DevX - Software Development Resource

Precise Division

Question: I have var1 and var2 both ints in a DB (only ints will be entered into var1, var2). But I want the result to show answer with decimal places:

DevX - Software Development Resource

Retrieving Data from a Text Field

Question: I have a table with a text field that stores a long description. When I use the Select statement to query the table, it only returns 255 characters. How

DevX - Software Development Resource

Insert Performance

Question: When I try to do a simple insert in a table with 25,000 records, it takes a long time do execute. In the same database for a table with

DevX - Software Development Resource

Create/Drop Table Problem

Question: When I execute this query: create table #T1 ( pk numeric( 9 ) ) drop table #T1 create table #T1 ( pk numeric( 9 ) ) drop table #T1

DevX - Software Development Resource

Track Changes on a Form

Question: I have an HTML page that is broken up into two different frames. The left frame acts as a navigation tool. The right frame is the user interface, which

DevX - Software Development Resource

Faxing a Report via WinFax Pro

Question: I want to output a report by Visual FoxPro 6.0 and fax it by WinFax Pro 9.0. I can output my report to an ASCII file which is then

DevX - Software Development Resource

Set DIV Clipping Height

Question: I am inserting some text into a DIV in Netscape using the .open, write(), and close() methods. At first there is nothing in the DIV, and when I check

DevX - Software Development Resource

Write concise code: a collection of simple tips

If you fully understand how VB and VBA work, you can often save some statements. This makes your listings more concise and more readable, and indirectly optimizes your program. Here

DevX - Software Development Resource

Write concise code with the InStr function

You can often use the Instr function in an unorthodox way to write more concise code. A typical example is when you need to test a single character: ‘ test

DevX - Software Development Resource

Write concise code with the IIf function

Use IIf when setting a value based upon an expression. This works only in situations where you have two choices, based upon the result of a Boolean expression. ‘long wayIf

DevX - Software Development Resource

Write concise code with Boolean expressions

When setting a Boolean value based upon the result of an expression, avoid using an unnecessary If/Then/Else structure. ‘Instead of using this lengthy syntax . . .If SomeVar > SomeOtherVar

DevX - Software Development Resource

Write concise code with the Switch function

Many VB developers don’t realize that the Switch built-in function can often save a lot of code. This function takes any number of (expr, value) pairs, it evaluates all expressions

DevX - Software Development Resource

Write concise code with the Choose function

The Choose function lets you often make more concise, albeit not faster, code, because it lets you replace a lengthy Select Case block. For example, the following code: Select Case

DevX - Software Development Resource

Counter in For-Next Statement

It is always easy for people who know Visual Basic to write code inVBScript. But sometimes you make some common mistakes because of the implementation differences between VB and VBScript.One

DevX - Software Development Resource

Rebuild Master Database

If you want to rebuild the master database you can run Rebuildm.exe command prompt utility. This utility allows you to rebuild the master database to change the character set, sort

DevX - Software Development Resource

Generic Listbox Columns Routine

Use the SendMessage API to set tab stops in a VB listbox by creating these declarations and this routine in a module: Private Declare Function SendMessage Lib _ “user32” Alias

DevX - Software Development Resource

Use IsLoaded to Check for Forms

The IsLoaded function tests to determine if any instances of a form are already loaded or exist in memory: If IsLoaded(“frmMyForm”) Then Debug.Print “frmMyForm is loaded”End IfPublic Function IsLoaded(sForm As

DevX - Software Development Resource

CheckboxGroup

Question: I am trying to put all the checkboxes in a CheckboxGroup into anunselected state, but Checkbox.setState(false) does notautomatically unselect the checkbox once a checkbox has been selectedwithin a CheckboxGroup.

DevX - Software Development Resource

Servlet Attributes and Parameters

Question: When a request message is processed through the HttpServlet doGetmethod, who sets the parameters and attributes for theHttpServletRequest argument? And what is the difference between anattribute and a parameter?

DevX - Software Development Resource

Simple HTML Display

Question: How can I have my servlet display an HTML file,located on the server, on the client’s browser? Answer: The HttpServlet class makes it very simple to send and receiveinformation

DevX - Software Development Resource

Enterprise JavaBeans

Question: What is the basic difference between JavaBeans and Enterprise JavaBeans? Answer: JavaBeans are a set of conventions and APIs for creating reusablesoftware components. The primary benefit is for visual