devxlogo

The Latest

sql user name

Question: How can I find out the user name at SQL prompt. Answer: In SQL Server, you can write select user_name() Related Posts Embarcadero Unveils Indoor/Outdoor Application Proximity SolutionIDC Predicts

Tab Control

Question: I have a popup window with tab control (four tabs). I need to specify at open time which tab page gets control. It always opens tab 1 no matter

SQL and arrays of data

Question: I need to enter up to 1,600 measured data points into a SQL database. Each point makes one record. Is there a way to enter all of these records

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

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

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

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

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

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

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

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

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:

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

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

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

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’)”

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;

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

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__

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

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

<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

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,

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

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

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

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

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