The Latest

DevX

Add comments to End If and Loop statements

Here’s a little programming tip that will save you hours of headacheslater.Most of us already indent our Ifs, Selects, Do…Loops, etc., and that is good. But suppose you have some

DevX

A better beep

If you aren’t satisfied with the standard Beep command (who is?) you can use the Beep API function instead, that lets you control both the frequency (in Hertz) and the

DevX

REMark out a group of lines

VB5 and VB6 environments include a pair hidden commands that let you remark and unremark a group of statements. These commands are hidden in the sense that they can be

DevX

Convert a VB6 project back to VB5

If you load a VB6 project file in the VB5 environment you get a warning, even though the project is correctly loaded. The cause of the warning is a VB6

DevX

Saving and restoring all IDE settings

At times you’d like to save all the current settings of the Visual Basic environment and restore them afterwards. For example, you may want to alternate between the MDI environment

DevX

Persistent breakpoints

When you close a VB IDE session, VB saves the code but doesn’t save the current set of breakpoints. If you need (non-conditional) breakpoints to persist among sessions, don’t use

DevX

ASP Pages Loading Slowly

Question: I just created some ASP pages that pull data from a Microsoft Access database. The new ASP pages load a lot slower than their old static HTML counterparts. What

DevX

Linking SQL Server to Informix

Question: Can I set up a live ODBC link from SQL Server 7 to an Informix (Standard Engine) database? Answer: You can set up your Informix server as a linked

DevX

Get Server Time at Workstation

Question: We want to timestamp transactions on an application that is not yet using a client/server database. Is there a Windows 2000 API that programmatically gets the server time? Answer:

DevX

Problem with Streams

Question: Why does a simple program such as the following produce compilation errors? #include#includeusing namespace std;int main(){ ostream_iterator os(cout); vector vi(3,0); os=vi[0]; os++; os=vi[1]; return 0;} I use the Microsoft

DevX

SELECT Using LIKE

Question: Can I use LIKE across all columns in a single table without having to name each column specifically? Answer: You cannot do this as a direct query against a

DevX

Accessing the Address of a String Element

Question: In the following code, how do I get the address of the first character of str in the function discard? discard(string *name){ //..}int main(){ string str; cin >> str;

DevX

Advantages of EXISTS over IN Clause in a Query

If you wish to retrieve from the department table all the department numbers that have at least one employee assigned to them, write the query as: select deptno, deptname from

DevX

Performance Analysis of Application by Code Profiling

Oracle8i provides a standard package, DBMS_PROFILER, which facilitates performance and code coverage analysis of your PL/SQL application. This package provides functions for gathering statistics, such as total number of times

DevX

Caching Packages on Database Startup

Oracle8i has introduced database-level and system-level triggers. They can track events in the database such as logon/logoff from a schema, startup and shutdown of a database, and response to a

DevX

Wrapping Application Code

Oracle comes with a PL/SQL wrapper, which converts the PL/SQL source code into an intermediate form of object code. By hiding application internals, the wrapper prevents the misuse of your

DevX

Avoid Multiple Exit Points in a Function

If you have a database function that has multiple return statements, try to minimize the exit points. I will explain with the following example: create or replace function getStatus(p_status_code in

DevX

How to Emit a Beep?

Question: How do I make a beep in C++? I’d like to make my program alert the user in case of errors. Answer: Use the ‘a’ escape sequence to emit

DevX

SQL Script from Linux OS

Question: How can I run an Informix SQL Script from the Linux Operating System command line directly? Answer: Use this format: dbaccess The is the name of the database and

DevX

SQL Server Datatypes

Question: Why doesn’t the datatype called sysname show up in all the tables’ dropdown lists of datatypes? Answer: The sysname datatype is a system datatype used to store database object

DevX

Private Member as Return Type?

Question: I was trying to test a base class and I came across an unusual question: in the below code, why doesn’t the compiler complain about the return code type

DevX

How Many Member Functions Can a Class Contain?

The C++ standard doesn’t specify the maximal number of member functions that a class can have. However, it recommends that it be 4096. Normally, classes don’t have more than 15-25

DevX

Avoiding Code Bloat Caused by Inline

I received an interesting question from a reader. He used STL’s vector in a class that was heavily used in his project. The two compilers he used produced an extremely

DevX

Chasing

I often receive readers’ queries regarding non-standard header files that they don’t have in their development suite, e.g.,,, that they wish to install. This header chase is futile Related Posts