ASP 101 - Active Server Pages 101
 internet.com
Home
News
* Samples
Forum
Articles
Resources
Lessons
Links
Search

Please visit our
Partners
Advertising Info

Windows Technology
  15 Seconds
  4GuysFromRolla.com
  ASP 101
  ASP Wire
  VB Forums
  VB Wire
  WinDrivers.com
  Win Planet


Compare products, prices, and stores at Hardware Central!

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

Software
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






internet.com
Developer
DevX
Downloads
EarthWeb
Graphics
Interactive Marketing
International
Internet Lists
Internet News
Internet Resources
IT
Linux/Open Source
Small Business
Windows Technology
Wireless Internet
xSP Resources

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

internet.commerce
  Be a Commerce Partner
 
 
 
 
 
 
 
 
 
 

QUICK TIP: Upgrade to the 5.5 Scripting Engine

Script Output:

sample

id (+/-) last_name (+/-) first_name (+/-) sales (+/-)
16 Graham Chris 4050

Back to the Table List

ASPHTMLDOWNLOAD          FAQ

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 adovbs.inc file. For more info see the comments near the include command.

A copy of the database is available here.


Samples

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


Jupiterweb networks

internet.comearthweb.comDevx.comClickZ

Search Jupiterweb:

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

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