devxlogo

The Latest

Data level security

Question: My environment is Win95, PB6.5, and Sybase SQL Server 11.0x. The table consists of entity, center, account, name, dollars, and hours. I need to be able to restrict access

Shifting the Focus in a JavaScript Rollover

Question: I am creating a complex table of images, each with its own rollover effect. The problem I’m experiencing is that after the user clicks on the image, it retains

Record Locking using LockEdits

Question: I am developing a multiuser application in Visual Basic 4.0 and wish to restrict users from editing Open or Locked records. Having successfully set up user security access and

Resources on Compatibility Across Browsers

Question: I am involved in a project that requires the client-side embedded scripts to be compatible down to version 3 of Internet Explorer and Netscape Navigator. So far I have

Find() function matching date values

Question: I am trying to use the find function using three char expressions and one date expression. I am using PB 6.5 with Oracle as the database. The following is

DeleteRow(0) in DW

Question: Does DeleteRow(0) delete the current row or the row at the bottom of the datawindow? Answer: It deletes the current row. Related Posts New Versions of DACs for RAD

How Can I Tell if a Sheet is Open

Question: How can I check if a certain sheet is Open? Answer: PowerBuilder stores a list of all the currently open sheets automatically for you. You can use the GetFirstSheet

Overload New and Delete in a Class

It is possible to override the global operators new and delete for a given class. For example, you can use this technique to override the default behavior of operator new

A Basic Output Stream Wrapper Class

When writing a program, you often need flexibility in where the trace/log output of the program is supposed to go. It could go to standard output, a log file, or

Various Forms of Initializing std::string

Class std::string can be initialized in five forms: by a C-string, by part of a C-string, by another string object, by a sequence of characters, or by part of another

Internationalize Your Dates

Although the Gregorian calendar is used by most of the world, the specific way in which dates are formatted varies from one place to another. In the United States, for

Forward Declarations and Templates

It is illegal to use forward declarations with typedef names, as in: class string; void f(string& s); //illegal, string is a typedef name Even a typename won’t do here: typename

Use MaxFileSize With Openfile Common Dialogs

When working with OpenFile common dialogs, set a large value for the MaxFileSize property, which affects the maximum length of the string returned in the FileName property. This is the

Label Loops in JavaScript

You can refer to named functions from anywhere within a JavaScript program by calling them by name. Sometimes it’s useful to be able to do the same for statements. Any

Install the Toolbar Wizard

VB6 comes with a Toolbar Wizard that lets you easily create a Toolbar control and the code that responds when users click on its buttons. However, how you install this

Don’t Duplicate ImageList Controls

A common control, such as a TreeView or a ListView, can use an ImageList control placed on a form different from the current one. This is useful when many forms

Converting

Question: Are there any utilities that will convert an .EXE file back to a .CPP file? A friend wrote a little program for me, and I would like to alter

Read-only members

Question: If I write a class in C++, which contains private members, I can make them read-only by providing a get access method and no set access method. If that

List NT Users on Domain

Question: How do I list all the users on an NT domain with Visual Basic? Answer: The following code should get you started. Note that you need to add good

Server Folders

Question: Is there a way to get a list of folders for a network drive passing in the server name(for example, \NetDrive). I tried using Dir(“\NetDrive”,vbDirectory) but received only an

Cannot load control SSTab1; license not found.

Question: I’ve tried to reinstall VB5, and I’ve installed Service Pack 3, but every time I try to use the Tabbed Dialogue control (TABCTL32.OCX), I get this message in the

Random File Access

Question: I am trying to read from a text file using FileInputStream. Is there a way that I can go directly to the middle of the file and read from

Array Length

Question: How do I know the size of the array returned by File.list() so I don’t get the message ArrayIndexOutOfBoundsException when printing the local directory content in the screen? Answer:

Reading Files with FTP

Question: I want to create an applcation that reads a file from a host on my LAN. The file must be read by FTP. How do I do this? Answer:

Extracting Integers From Text file

Question: How do I read a series of integers from an ASCII text file? The file contains a sequence of numbers like 110 120 130 140 … I tried to

Parameters for NT Services

Question: I have written a service that accepts some parameters. How do I set up the service to send those parameters to the service when it starts? Answer: Since services

WIN NT User ID

Question: Do you know where to locate the Windows NT user ID so that I can add the user to the Exchange Server? Answer: The following code works just fine:

OLEAUT32 and Y2K

Question: I have heard that the two-year date cutoff for oleaut32.dll is user-definable. By this I mean that you can set oleaut32 to recognize “80” as 2080 instead of 1980.

JFrame Exit Button

Question: Is it possible to remove the close button from a JFrame or at least disable it? Answer: It is possible to disable the function of the close button on