The Latest

DevX - Software Development Resource

Virtual Includes

Question: I’ve been told that you cannot have dynamic virtual includes inJSP. Is this true? For example, is something like this going tocause problems? Answer: JSP is still relatively new,

DevX - Software Development Resource

Servlets vs JSP

Question: What is the difference between servlets and Java Server Pages? Which is preferred? Answer: Servlets and Java Server Pages are complementary APIs, both providinga means for generating dynamic Web

DevX - Software Development Resource

Insert Persistent Breakpoints

VB won’t let you save a breakpoint when you have a lengthy debugging session. Use Debug.Assert to create persistent breakpoints that trigger when you are in the environment, but not

DevX - Software Development Resource

Print the Frame From JavaScript

You can print the entire document from the JavaScript using Parent.Print() function. Similarly, to print a frame from JavaScript, you can use parent.framename.print() in the code. For example, this code

DevX - Software Development Resource

Handle Collisions in DAO and RDO Data Access Techniques

RDO and DAO data access components handle collisions while updating a database differently than the ADO data access component. The rdoResultset and Recordset objects contain BatchCollisionCount properties that indicate how

DevX - Software Development Resource

Forward-Declaring a Namespace Member

Suppose you need to forward-declare class Interest, which is a member of namespace Bank. It would seem that all you need to do is use the class’s fully qualified name:

DevX - Software Development Resource

ActiveX Can’t Create Which Object?

When working on a large VB application that uses hundreds of COM objects, the “429 can’t create object” error doesn’t give you much help in determining which object could not

DevX - Software Development Resource

Real Time Programming: Myths and Reality

The term “real time” has become a buzzword, as in “real time stock quotes” or “real time database queries”. However, neither a database-oriented system nor a NYSE stock ticker running

DevX - Software Development Resource

Dynamic Versus Static Binding

Not every call of a virtual function is resolved dynamically. In fact, in many cases the compiler resolves the call statically, even if the function is declared virtual. For example:

DevX - Software Development Resource

Assign Toolbar Button Images at Run Time

When developing applications, quite often you end up experimenting with different toolbar icons to test how well they serve their purpose. If you change an icon in an ImageList, you

DevX - Software Development Resource

Count ASP Sessions

Question: I am trying to count the number of users (sessions opened) to a given app. It easy enough to increment an Application variable with Session_Onstart and decrement it with

DevX - Software Development Resource

Make Variable Available to All Pages

Question: Can I use a global variable in VBScript and make it accessible from any Web page? Answer: There is no such thing as a global variable in Web pages.

DevX - Software Development Resource

Find the Path of a Project With ASP

Question: Is there any way to programmatically determine the path of the current ASP page on the server? I am trying to access a specific text that I added to

DevX - Software Development Resource

Determine Which Submit Button Was Clicked

Question: I have a Web page with a form(action=sample.asp),frmProduct. The form has some textboxes (one of which is a key field, sav txtKey) and two submit buttons: one for retrieve

DevX - Software Development Resource

Reference a DLL From an ASP Page

Question: I wrote a DLL in Visual Basic and I want to use its functions in ASP. I created a server.CreateObject(“projectname.classname”) and tried to call some of the methods of

DevX - Software Development Resource

Get Count of Records in a Recordset

Question: How do I get the number of records from a “select * from dept where deptno = ..”? I want to know how many records are in my recordset

DevX - Software Development Resource

Leverage Office to Spellcheck RichText

Integrate Microsoft Word 97’s spellchecking capability into VB apps while maintaining formatting within a rich textbox. To test this code:1. Create a standard EXE project in VB.2. Add the RichTextBox

DevX - Software Development Resource

Handle Update Collisions in ADO Disconnected Recordsets

Data-access techniques using cached data on the client for updates is possible using disconnected recordsets. This technique generates collisions in some situations. However, the technique for dealing with collisions rows

DevX - Software Development Resource

Extracting a Number From a String

There are many applications that store numbers in strings that also contain text. For example, some databases store dates as strings in the form of “01Jan”. You can extract the

DevX - Software Development Resource

Run Time Object / Control Management

Question: Can I write statements to add/delete the control objects like command buttonsat runtime like we do in java C++ ? Iam under the assumption that once we populate a

DevX - Software Development Resource

Refresh Part of a Page

Question: Is there a way to refresh or redraw part of a screen display using HTML and JavaScript without using frames? I want the top 1/4 of my screen to

DevX - Software Development Resource

Nested Quotes and JavaScript

Question: I am trying to use document.writeln to write a table onto a floating menu bar. Part of the table cell’s events is Java code. When it reaches the semicolons

DevX - Software Development Resource

Set Font Size in Tables Using DHTML

Question: In Microsoft Internet Explorer, I can specify a style as TABLE.listTable { font-size : “10pt”} and all the cells of the table will have a 10pt font size. In

DevX - Software Development Resource

Preserve the Format of Text/Memo Fields

Question: We are doing a small site with some ASP content. When we get data from a memo field that has CR/LFs at the end of the lines for formatting

DevX - Software Development Resource

Abstract Classes

Question: Can I instantiate an abstract class? Answer: No, you cannot instantiate an abstract class. However, you can declare a pointer or a reference to it: class Abs{public: virtual void

DevX - Software Development Resource

Display Contents of ADODB.Errors Collection

When ADO encounters an error, the Errors Collectionis filled with certain specific details on the causeof the error. You can check the Errors collection ofthe Connection object whenever you encounter