May 10, 2003

Use the CASE Statement in a SQL SELECT Clause

SQL Server provides a mechanism for returning different values in a SELECT clause based on Boolean conditions: the CASE statement. This statement resembles Visual Basics Select Case statement. The SQL CASE statement has WHEN, THEN, and ELSE clauses along with an END terminator. The syntax is: CASE [expression] WHEN [value

Book Excerpt: JavaScript & DHTML Cookbook

he JavaScript & DHTML Cookbook is all about adding value to the content of a Web page. The book focuses on practical and sensible applications of scripting, rather than flying images and gratuitous color changes. For every problem Goodman addresses, there’s a solution or “recipe”?a focused piece of code that

Review: ASP.NET Web Matrix

eb Matrix is a freeware tool that has been created with the help of some ASP community leaders. Despite its shortcomings, Active Server Pages (ASP) is one of the most popular Web development platforms available today. This is mainly because the basic concept, altering HTML output through script, is very

Using Stored Procedures in Conjunction with the SqlDataAdapter

ncapsulating data update logic in stored procedures is an excellent way to improve the manageability, scalability, and security of your database-driven applications. There are many advantages to incorporating stored procedures into your application logic including: Shared application logic among various client applications Faster execution Reduced network traffic Improved database security

A Not-So-Quick Tour of the Web DataGrid Control

ata-bound controls play a key role in the development of ASP.NET applications. Data-driven controls allow you to associate their whole interface, or individual properties, with one or more columns of a .NET-compliant data source. In this article, I’ll delve into the depths of an extremely versatile data-bound control that is

Using the ASP.NET Runtime to Extend Desktop Applications with HTML Scripts

he ASP.NET runtime in .NET provides the ability to create rich HTML content for your applications dynamically in your desktop applications. It also provides a powerful mechanism for extending the functionality of applications through script code. A few issues back (CoDe Magazine, Nov/Dec 2002) I introduced the topic of dynamic

Send Email Using OLE Automation Stored Procedures in SQL Server 2000

Use OLE automation stored procedures to send email: DECLARE @SenderAddress varchar(100)DECLARE @RecipientAddress varchar(100)DECLARE @Subject varchar(200)DECLARE @Body varchar(8000)DECLARE @oMail int –Object referenceDECLARE @resultcode intSET @SenderAddress = ‘[email protected]’SET @RecipientAddress= ‘[email protected]’SELECT @Subject = ‘subject of email for today ‘ + CAST(getdate() ASvarchar(12))SET @Body = ‘This is the body of my email’EXEC @resultcode =

Store XML in C++ Source Code

XMLwhen it is in ASCIIcan be stored as any other literal in one line, but it’s not very readable. Use the following macros to store XML (or any other string for that matter) across multiple lines (no quotes necessary): #define BEGIN_XML( data ) static char data[] = {#define XML( text

Introduction to JavaScript and DHTML

avaScript is a powerful yet often underused feature of most browser-based applications. Commonly, JavaScript is relegated to simple form validations, but this is not the only capability of JavaScript. In this article I’ll cover a powerful set of features you can incorporate in your applications today. This article explores the

No more posts to show