Home arrow ASP arrow Page 3 - Grabbing Data On The Fly

Grabbing Data On The Fly

When we're querying a database, we will usually need to press a submit button on a form to pass data to another ASP page, which would generate the query, and return the results. In some situations, this page refresh is just plain annoying and takes too long to complete. In this article, Phanix will describe another way to query a database using a combination of web technologies.

Author Info:
By: Phanix Chen
Rating: 5 stars5 stars5 stars5 stars5 stars / 8
December 08, 2001
  1. · Grabbing Data On The Fly
  2. · Some methods for passing data around
  3. · Using frames to solve the refresh problem
  4. · Query and return
  5. · The processframe.asp page
  6. · Conclusion

print this article

Grabbing Data On The Fly - Using frames to solve the refresh problem
(Page 3 of 6 )

Suppose that we manage an online bookstore, and that we use a web page to add new books to the database. While we are keying in the details of a new book, suppose we aren’t sure of the author. We could create a form that would allow us to enter part of the authors name and then select the author from a list of possible authors who match our criteria. The form might look like this:

A sample form from our online bookstore

Suppose the drop down component of “Author” is named “AuthorID”. This example will work with the sample SQL database, pubs. Our author database holds the values of author ID (au_id), author name (au_lname), etc. We want to display author name in the drop down component, and author ID as the value of each item in the drop down component. We can enter a keyword in the text field of “Query”, then click the “Query” button. After clicking, the keyword will be sent to a hidden frame (frame size is zero) named “ProcessFrame”. An ASP script will execute a LIKE SQL query on the authors’ table of the pubs database in the “ProcessFrame” and return the result to the source frame (named “MainFrame”). Lastly, the “Author” drop down component will be filled with the results of the query. The flow of operation looks like this:

The flow of operation for our application
blog comments powered by Disqus

- Central Scoreboard with Flash and ASP
- Calorie Counter Using WAP and ASP
- Creating PGP-Encrypted E-Mails Using ASP
- Be My Guest in ASP
- Session Replacement in ASP
- Securing ASP Data Access Credentials Using t...
- The Not So Ordinary Address Book
- Adding and Displaying Data Easily via ASP an...
- Sending Email From a Form in ASP
- Adding Member Services in ASP
- Removing Unconfirmed Members
- Trapping HTTP 500.100 - Internal Server Error
- So Many Rows, So Little Time! - Case Study
- XDO: An XML Engine Class for Classic ASP
- Credit Card Fraud Prevention Using ASP and C...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials