Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


May 08, 2006

Display Tables’ Contents in a Browser

RSS
View this exclusive article with VIP access -- click here to join |
See More Database Articles Here | Reprints | Or sign up for our VIP Monthly Pass!

Download the Code Here

I wrote a script, QueryTable.vbs, that queries a table on a local or remote database server and displays that table's contents in a browser. I needed this script when I was visiting a remote machine with no client database access tools but needed to see contents of certain tables.

Listing 1 shows an excerpt from QueryTable.vbs. (You can download the entire script from the Windows Scripting Solutions Web site.) Here's how the script works: After declaring the database and table variables and setting database connection parameters, the script connects to the specified-table and retrieves the table's fields and their values. The script then creates the QryResults.html file and writes the table's contents in that file.

To use this script, you need to customize the DataSrc, DBName, sTable variables' values in the code that callout A in Listing 1 shows. QueryTable.vbs is fully customizable and not limited just to one type of table or one type of database server.

End of Article



Reader Comments

You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
The Memory-Optimization Hoax

Don't believe the hype. At best, RAM optimizers have no effect. At worst, they seriously degrade performance. ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

SET Options and Recompilation

Learn how to tweak your server's SET options so that you don't have to constantly recompile. ...


Related Articles Script Inventories Remote Computers and Writes the Information to a Database

SQL Server and Database Whitepapers StoreVault SnapManagers for Microsoft Exchange and SQL Server

Related Events Microsoft BI Unleashed | Online Conference

SQL Server 2008 – Can You Wait? | Philadelphia

Check out our list of Free Email Newsletters!

SQL Server and Database eBooks Safeguarding Your Windows Servers

SQL Server Administration for Oracle DBAs

Taking Control: Monitoring the Windows Platform Proactively

Related SQL Server and Database Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing