devxlogo

The Latest

Using dynamic_cast

You can apply operator dynamic_cast only to polymorphic objects (a polymorphic object is one that has at least one virtual member function). This is a requirement of the C++ standard.

Orphaned Exchange Accounts

Question: I have some orphaned Exchange mailboxes that are displayed under Private Information Store/Mailbox Resources. How do I remove them if the object is not defined in the DS? Answer:

Don’t use = operator on Date values

Date variables store values in floating point format, much like Double variables, with the integer part for dates and the fractional part for the time portion. Being floating point values,

Use Server.HTMLEncode for strings stored in a database

If your ASP pages display strings stored in database fields, you should always process the strings with the Server.HTMLEncode method, otherwise the string won’t be displayed correctly in the user’s

Out-of-date dependency file for COMCTL32.OCX

Have you ever read a message like “Dependency file for COMCTL32.OCX is out of date” during the package creation process? The cause of this problem is simple: you have installed

Null values in WHERE clauses

A SELECT query returns all the rows for which the WHERE clause returns True. However, many developer – especially those accustomed to other programming languages, such as VB – get

GROUP BY and UNION may return unsorted resultsets

In SQL Server 6.5 and previous versions, the GROUP BY clause in a SELECT statement was carried out by temporarily sorting the resultset before grouping similar rows, therefore the end

Share Data Across MTS Objects

One of the resource dispensers that come with MTS is Shared Property Manager (SPM). SPM provides a mechanism by which you can share global memory among all the objects that

ASP Compatibility

Question: According to the stats of my Web site, there are still quite a few users who use old browsers like Netscape 3.0 and Explorer 3.0. If I start using

Deleting Fields from Recordset Object

Question: I am using a disconnected recordset (adOpenStatic, adUseClient) which is obtained by executing a stored procedure using command an object. I tried to delete some fields from the recodset

XHTML and Javascript

Question: Can Javascript code be used in XHTML Web pages? Answer: Sure. The only real difference between XHTML and HTML is the consideration for ampersands and less than symbols. Thus,

Sending Null Values to a Required Field

Question: When I try to send some information to an access database through ASP, I get the following error: [Microsoft][ODBC Microsoft Access 97 Driver] Field ‘tablename.class’ can’t be a zero-length

XML Schemas

Question: What is the difference between SOX schemas and XDR schemas? Answer: SOX schemas are more object-oriented (the name in fact means Schemas for Object-Oriented XML), allowing you to assign

Save and Load

Question: Is there any way to do a incremental save using XMLDOMDocument (MSXML parser) and also loading part of the Document tree? Answer: A SaveInto or a LoadFrom command? As

Searching a Database for a Keyword

Question: When setting up a recordset, is it possible to get a record when the field contains more than the word that I’m looking for and where the words are

Special Characters and XML Strings

XML has a special set of characters that cannot be used in normal XML strings. These characters are: & – & < - < > – > ” – "

Redirect User To Correct Login Page

If a user runs a page on our site and has not yet logged in, we can redirect him to the correct login page with the following script: Related Posts

OS System Calls

Question: How can I pass a member function of a class as a pointer in C (pointer type expected: void *)? Answer: You can’t pass a pointer to a C++

Bit Fields and Memory Alignment

Question: Using Visual C++ 6.0, I recently attempted to create a structure to implement a data message that my application had to process. The following code segment produced unexpected results

Clearing the Screen

Question: What is the “clear screen” function in C++, and which library is it in? Answer: Standard C and C++ don’t define a function that clears the screen. DOS and

Pros and Cons of Extended Stored Procedures

Question: What are the pros and cons of creating extended stored procedures? Answer: The pros are that you can implement additional functionality and access data from DLLs from within SQL

Best Method for Inserting Rows

Question: From a database-efficiency standpoint, which is better for SQL when inserting new rows into a table: issuing ad hoc SQL statements in the form of “Insert Into…” or using

Memo Fields

Question: I have a memo field in a table, which has been scattered to memvar. I need to append a standard statement to the field once the user has completed

SQL Summary

Question: How do I print out all of the tables, the fields the tables contain, and the datatype of the fields in my accounting database (for report creation)? I am