ASP 101 - Active Server Pages 101
* Samples

Please visit our
Advertising Info

Windows Technology
  15 Seconds
  ASP 101
  ASP Wire
  VB Forums
  VB Wire
  Win Planet

Compare products, prices, and stores at Hardware Central!

Desktops, Mac & PC Notebooks, Monitors, Network Adapters, Firewalls, RAM, Networking Hubs & Switches, Network Accessories, Network Cables, more...

Network Management Tools, Programming Tools, Internet & Communication Applications, Software Suites, Operating Systems, more...

Get the best price on Veritas Backup Exec For Windows Servers or search for other IT Management tools
Interactive Marketing
Internet Lists
Internet News
Internet Resources
Linux/Open Source
Small Business
Windows Technology
Wireless Internet
xSP Resources

Corporate Info
Tech Jobs
E-mail Offers

  Be a Commerce Partner

QUICK TIP: Switch to Fewer Colors Before Capturing Images

Script Output:


SalesmanId (+/-) Timestamp (+/-) Amount (+/-)
3 7/24/2002 11:43:00 AM 2045

Back to the Table List


Ok, here's yet another DB sample since that's what everyone seems to want. If you look through this script, you'll see that there are no DB specific commands. This somewhat limits what you can do with it; however, what it does allow, is for this script to work with any DB for which you can set up a DSN or provide a connection string for!!!

That's right boys and girls, this script will work with your DB! All you need to do is set the three constants for the connection string, username, and password, and it's up and running. (If you're using Access, you don't even need to change the username or password unless you've password protected the database!)

I was initially even going to let you choose one or type in your own SQL server address and connection info, but I figured that could very quickly cause problems so I've hard-coded this to our standard sample db.

Here's a quick run down of what it does. When first called it lists the tables in the DB. You select one and it pulls in ALL THE DATA! (So don't use this on your SQL server, 5gig, inventory DB!) From there, you can sort by any column or drill down based on any value. For instance, you connect it to your web server's log file database and you want to see all the hits to a specific page. You simply find an instance of that page and click on it. The script will return all records with a matching value in that field. Even once you're at this stage, you can still sort by any field using the (+/-) in the column heading.

You can't edit anything, but for taking a quick look to see what's up, it sure beats loading up your DB tool, and you can do it from anywhere you can get to a browser. Once again though, be VERY careful of using it on large DB's. It was meant as a quick sample, so it doesn't warn you if you try and open a table with thousands or even millions of lines. If you've got that kind of data, write your own script or at least put in a maximum number of returned records.

The only other issue you may have with it is its use of ADO constants. You'll need to dig out your file. For more info see the comments near the include command.

A copy of the database is available here.


Home | News | Samples | Forum | Articles | Resources | Lessons | Links | Search

Jupiterweb networks


Search Jupiterweb:

Copyright 2004 Jupitermedia Corporation All Rights Reserved.
Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Corporate Info | Newsletters | Tech Jobs | E-mail Offers