ASP 101 - Active Server Pages 101 - Web03
The Place ASP Developers Go!

Please visit our partners

Windows Technology Windows Technology
15 Seconds
4GuysFromRolla.com
ASP 101
ASP Wire
VB Forums
VB Wire
WinDrivers.com
internet.commerce internet.commerce
Partners & Affiliates














ASP 101 is an
internet.com site
ASP 101 is an internet.com site
IT
Developer
Internet News
Small Business
Personal Technology
International

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

ASP 101 News Flash ASP 101 News Flash




Script Output:

polls

id (+/-) question (+/-) choice1 (+/-) choice2 (+/-) choice3 (+/-) choice4 (+/-) choice5 (+/-) votes1 (+/-) votes2 (+/-) votes3 (+/-) votes4 (+/-) votes5 (+/-)
1 In which language do you write most your ASP scripts? JScript PerlScipt VBScript Other   35418 25403 44780 26335 0

Back to the Table List

ASP HTML Download            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 |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
Avaya Article: How to Begin Developing with Avaya's Event Processing Language
Avaya Article: Deep Dive--Event Processor Offers Familiar Tools for Creating Event-Driven SOA Apps
Intel Whitepaper: A Methodology for Threading Serial Applications (PDF)
HP eBook: Storage Networking , Part 1
ServerWatch.com Article: Tip of the Trade--IP Address Management
ITChannelPlanet.com Article: Enterprise Fixed-Mobile Convergence Can Be Lucrative
Intel Article: Transitioning Software to Future Generations of Multi-Core
Hoovers Article: Boost Employee Morale without Breaking the Bank
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
Internet.com eBook: All About Botnets
Intel Article: 8 Simple Rules for Designing Threaded Applications
Intel Whitepaper: Best Practices for Developing and Optimizing Threaded Applications
Intel Article: The Challenges of Developing Multithreaded Processing Pipelines
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Foundations of Parallel Programming, Part One
HP Video: Page Cost Calculator
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Intel Video: Three Must-Knows for Parallelism
Microsoft Partner Program Video: The Secrets to Partner Success
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
How-to-Article: How to Market Your Technology Solutions
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES