magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1998 > 06 > Script Junkie  

A Database Framework with ASP

By Marco Tabini

While so-called dynamic Web sites have gained in popularity over the past year, these database-generated sites take time to design and set up. While Microsoft's Active Server Pages (ASP) have made creating dynamic Web sites much easier, many of the tasks are common to any database application and can therefore be abstracted. Realizing this, I recently created an ASP-based database query system composed of only six pages, called Web2SQL, that can also serve as a template for building dynamic Web sites. You can use Web2SQL to access and manipulate any Microsoft SQL database. With just a few changes, any Open Database Connectivity (ODBC) compatible database.

Designing the System

ODBC generally describes database connections through specialized structures called "datasources" (DSNs). Each DSN contains information such as what kind of database it points to, the location of the database provider (the network address of a SQL server or the path of an Access file, for example), login name, password, and so on. A single datasource can be used only to access a specific database residing on a specific server. Unfortunately, this hard coding of datasources defeats our purpose of generating pages dynamically. One solution is to create database connections that don't rely on the datasource. Such connections are known as DSN-less connections, and are created by specifying a particular connection string before calling the Open method of the connection component as shown in



  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2