Allowing multiple choices of data elements enables people to customize views of your data and adds value to your applications. In this sample code, user inputted choice(s) are added to the basic sql statement to draw them from the db. Since the input from the dropdown menu comes through comma delimited it is simply written into the statement without modification. Two simple for next loops determine which elements are part of the record set and displays them accordingly.
ODBC is great and all but for speed and reliability you should switch to OLE DB to power your database driven apps. This tutorial will show you how to do it two ways: in the global.asa and in any ASP page.
Displaying specific subsets of data from a database is easy to accomplish in .asp. The following example utilizes an Access database of Mark "The Bird" Fidrych and displays all of his season statistics for 1976 contained in the database rather than displaying the entire db.
Allowing multiple choices of data observations enables people to customize views of your data and adds value to your applications. This example utilizes our db on the career statistics of Hammerin’ Hank Greenberg. The years he played are available to select from in a dropdown menu. When multiple years are selected they are passed comma delimited. Utilizing the where in statement in our sql the comma delimited selections are appended to our sql statement to display only those years selected.
You fill in the blanks, and you are given the source code for the form, and a page to display the information in the database. Also the database is ready to download with all fields in your form.
This article will help you to create a System Data Source Name (DSN) for Microsoft SQL Server on your local machine. After a System DSN has been created you can use it within any ASP page located on the same computer.
This page demonstrates the capabilities how to display a table from a SQL statement. It illustrates not only how to display the table, but also how to detect that no records
were returned from a query, and how to detect null and blank values in the data.