This is called a singleton query. ADO.Net has specific functions for singleton queries, but not ADO (ActiveX Data Objects). This article describes how to use an ADO command object to perform faster singleton queries.
Allowing multiple choices of data elements enables people to customize views of your data and adds value to your applications. The following example utilizes our db on the career statistics of Hammerin? Hank Greenberg. The year and team he played with are already part of the sql request to the db. 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.
Learn how to select a record from database. First we need to calculate how many records we have in our table. Using randomize function, we generate a random number between 0 to count of records in database.
Now everybody can connect to a database. Simple database access is a huge feature of ASP and one of the most widely used by developers but when you are first learning, it's hard to separate the database stuff from the rest of the code so I made this example
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.