2612Generating Random Records from the Databasehttp://www.stardeveloper.com/asp_rndrec_1.aspIn this article we will learn how to display random records from the database. From the articles so far, you will be able to display records from the database in a variety of ways and do a lot with them. We will add to our ASP-Database knowledge by enabling our ASP scripts to show random records.ASP > Tips and Tutorials > Database-relatedOct 10, 2006
My purpose of this example is to show how to get records from an html form and submit that form to an ASP page. This ASP page will then use SQL to enter the records into the database When I started doing ASP, getting records from an ASP page to a database was my 1st thing I wanted to do. I quickly discovered there was a few ways you could do that. This example uses formatted SQL and the Execute method of the Connection object to take data from a html form and submit to an ASP page that processes the data using SQL.
Providing search capabilities to a db enables users to query on whichever element you target them to. However allowing users to target which portion of the db they would like to query gives extra value. In this example, utilizing our db of US States (state, statename, and capital) the user can search in any of three fields (by dropdown menu input) rather than the application targeting one specific table element. Note: The db only has 50 observations in it, so it is better to search on single or double letter combinations.
This is a topic I've seen covered by others in the past but never in enough detail to satisfy me. This technique is extremely powerful and can yield huge performance gains over non-cached queries and therefore deserves more attention.
Want to add value to your current search? Allow your users to search from within search results. As databases grow the necessity for the user to continually narrow a search to the item that they truly want will grow also. The following example utilizes our db on U.S. State capitals. Upon the first search two radio buttons will appear indicating a search (default) or a search within the current results. Searching within the current results will take the first search and add it to the new search and so on. Note the db only has 50 observations in it. For best results search on a letter and search for another letter within those results.
Joining mailing list will entitle you
to receive occasional emails informing you of news and
updates to the site and any special offers that may be
of interest to you.