
Since 1998, DevX has helped people start businesses, build websites, and provide enterprise technology to people globally. Interviewing the likes of Microsoft’s co-founder, Steve Ballmer, the publication brings comprehensive, reliable, and accessible insights to the Internet.
hen working with the Microsoft Foundation Class Library (MFC), I occasionally need dialog boxes that look and act similarly but have small differences?dialog boxes that do different things with the
You can use the name of a Function or Property Get procedure as a local variable anywhere in the procedure. If your procedure returns a String or UDT type, writing
You can stop a program
To determine whether a control is a member of a control array, you can reference its Index property and handle the generated error when the control is not in an
When the user presses Cancel on a VB InputBox, the string returned is a vbNullString. If the user inputs a zero-length string and presses OK, the return string is empty
The CheckBox control in VB supports three positions: Checked, Unchecked, and Grayed. Unfortunately, the default behavior for the control is to cycle between Checked and Unchecked. To set it to
This is a simple tip that proves useful in the long run. Consider the following example: void someFunction() {Date d= new Date(); // The Date object is created outside the
To insert data with single quotes, place 2 single quotes instead of 1 single quote, like this: create table MyTable ( Field1 varchar(10))goinsert MyTable (Field1) select ‘A1111”1111’ UNION ALL select
This method allows you to insert multi-lingual characters into an Oracle database. In this tip, the column type is varchar2. The multi-lingual string is converted to its unicode value and
This code can also be used to navigate through the Resultset backward or forward, or to perform insertions, deletions and updates to update the database. //load JDBC Driver// Get the
JavaScript does not offer Left and Right functions. Use the following functions to extract the left or the right part of a string. function Left(str, n){ if (n String(str).length) return
This tip explains how to pass an object to a JavaScript function and retrieve the values from the “this” object. See the following piece of code: click… Run the above
This guestbook shows how to use some features of ASP.NET, such as data-binding, database programming, Web Forms security, caching and the Web.Config settings. You’ll also see in action the DataGrid
‘ Returns a formatted string that shows the size in Bytes, KBytes or MBytes’ according to the size’ Usage:’ Dim ProperSizeString As String = FormatSize(“132100842”)’ -> returns “125.98 MB”Function FormatSize(ByVal
‘ Put quotes around a string and double any embedded Chr$(34)” convert all control characters into ControlChars.*** VB constants’ or CHR() functions” This function is useful, for example, when you
‘ Compares a numeric or string value with a list of other values.’ Returns the 1-based index of the matching value, or zero if the’ value doesn’t appear in the
roviding a service on the Web entails a wealth of concerns, from system design, network architecture, and application development, to maintenance and security. This last aspect is often overlooked and
hen deploying a web server and web applications, you must defend against malicious attackers who can identify and exploit the vulnerabilities in these servers and apps. The nimda worm and
ow many times has your 12-week project been cut to nine weeks, or your project team loses a member yet you’re still expected to maintain the same project schedule? Getting
This functionality is not currently available in Javascript. However, tou can add this function to perform trimming in the strings. Trimming is useful in checking for empty spaces. function RTrim(str){
This code allows any image to be used as a background, and scales that image to fit the browser. Just add it to the end of your HTML page:
This is an advanced solution to delete duplicate Rows from a table using the cursor: create table DupTable ( Field1 varchar(20))goinsert DupTable (Field1) select ‘A11111111’ UNION ALL select ‘B22222222’ UNION
BCP is a command line tool that allows you to obtain data quickly, whether that data is in or out of a database or tables. The script below uses an
Using the IDENTITY function, you can add a Record number to an existing table.For Example: select * from addresscity state zip contract——————– —– —– ——–Lawrence KS 66044 0Nashville TN 37215
To translate an error code to its verbal description, use the function strerror(). strerror() is declared in as follows: char * strerror(int errcode); The function takes an error code and
Applications that handle signals must distinguish between atomic and non-atomic datatypes. Reading or writing an atomic object is guaranteed to take one instruction. By contrast, accessing a non-atomic object may
System calls and Standard Library functions assign a zero value to the global variable errno to indicate success. In case of an error, they assign negative values to errno. On
C and C++ differ in their interpretation of an empty parameter list. In the following function declaration: void f(); // different meanings in C and C++ C++ treats f as
You can define a template member function in an ordinary class as follows: class C{public: template int func(T* p);};template int C::func(T* p){ return 0;} Note that Visual C++ doesn
The native VB6 Split and Join functions have highlighted a number of useful techniques, and VB5 and VB4 programmers can use this extended facility as well. This code emulates the











