July 1, 1999

Determine Server With ServerVariables

Question: We have users coming into our homepage from two different servers. I would like to differentiate what gets shown (text, links, and so forth) based on the server that the user is coming through. Is it possible to identify what server is being used when the data is being

Using Integral Types With Explicit Sizes

The actual size of the built-in integral types are machine dependent (see also the Tip Standards Provide Guarantees Regarding the Sizes of Integral Types): //built-in integral types with machine-dependent sizeschar int short long When you need explicit, platform-independent sizes, you can use the following standardized typedef’s instead: int8 //signed 8

Standards Provide Guarantees Regarding the Sizes of Integral Types

Char, short, int, and long have implementation-defined sizes. However, Standard C and C++ provide a few guarantees about their sizes. Both standards guarantee that char has at least 8 bits, and that it is not larger than short. Short may not be larger than int and it must occupy at

Consistent Project Descriptions

Always set the Description property of your ActiveX projects (found in Properties) to be prefixed with your company name or initials. That way, all your internal objects and components will be grouped together alphabetically, and you won’t have to search for them in the list.

Clean Up Your Objects—In the Right Order

Although Microsoft Internet Information Server (IIS) eventually removes your unused database objects (called garbage collection), poor coding can squander the server’s resources. If your Web server drags or even fails for no apparent reason, look for connections and objects that haven’t been closed. For a high-volume, data-intensive Web site, you

Set SQL Server as a DSN Server Using the Stored Procedure sp_serveroption

A Data Source Name (DSN) server is one that receives replication data through ODBC. This DSN can be accessed only through Microsoft SQL Server because replication is being used. The DSN has information about the database vendor name, the database version, the database name, and whether the database permits subscribers.