NEW LISTINGS  HOT LISTINGS  TOP RATED  EDITOR PICK  ADD A LISTING  UPDATE A LISTING  GET RATED  UPGRADE A LISTING
  HOME     MY ACCOUNT     POWER SEARCH     REGISTER     MEMBER LIST     SUGGEST CATEGORY  

Average Visitor Rating: 0.00 (out of 5)
Number of ratings: 0 Votes

Visitor Rating

Multiple Form Selection
2617 Multiple Form Selection http://www.codeave.com/asp/code.asp?u_log=125 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. ASP > Tips and Tutorials > Database-related Oct 10, 2006

Write a Review   Add to My Favorite   Refer it to Friend   Report Broken Link  

Bookmark Multiple Form Selection:


Other links at ASP > Tips and Tutorials > Database-related
As databases grow in size, displaying information in organized, consumable "chunks" becomes more and more difficult. For example, if a database table contains thousands or even hundreds of rows, simply dumping the entire contents of the table can overwhelm the user and be difficult to pick through. As developers it is our job to provide information in digestible quantities. One common solution is to page database table results. That is, only a small number of database records are shown per screen, accompanied by Next and Previous buttons allowing the user to step through the database results in sensible steps.

There are already a number of great 4Guys articles on paging database records. If you are using SQL Server it is strongly recommended that you use a stored procedure-based approach, as outlined in the article Paging through Records Using a Stored Procedure. A script that uses AbsolutePage, PageSize, and PageCount (three ADO properties designed to allow for paging) can be seen at Paged Table Display, authored by Charles Carroll and Jeff Emrich.

This article provides an alternative way to page through database records. This technique uses the GetRows method of the Recordset object. GetRows dumps the Recordset data into a two-dimensional array. The first dimension of the array stores the column information while the second dimension stores the row information. The following snippet of code illustrates how to use GetRows:
Category:

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.
Category:

DSN Connections
In my earlier article on Accessing the database from ASP I explained connecting to database via DSN in a step by step mannner. So there is no need to repeat that again, you can see it from there.

DSN stands for 'Data Source Name'. It is an easy way to assign useful and easily rememberable names to data sources which may not be limited to databases alone e.g Excel spread sheet etc.

I will now skip the steps of creating and assigning DSN to a database, you can see them by clicking here. Once you are done creating a DSN for your data source ( database lets say ), you can connect to it using following code
Category:

You can connect to an Access database within an ASP page with different methods. This article will help you to create a System Data Source Name (DSN) for an Access database on your local machine.
Open Control Panel window, you will see different icons as shown in Pic 1.
Doubble click on ODBC Data Source Administrator icon.
Category:

Filter method is very useful working with large datasets. You might need to put only some records from your database but you should select all data from database. Fileter method is advantage working on recordsets after querying on SQL command.

Let's see what's going on a fresh example
Category:




Main Category
192
2037
816
286
175
1802
1222
911
1163
7478
70
907
59
2222
174

Join Mailing List
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.



Top 10
Directory Statistics

Links: 19493
Categories: 1275
Registered Users: 748
Mailing List Subscribers: 2046
Unique Outgoing Hits: 227528

Pagerank Statistics
PR 10
1 site(s)
PR 9
13 site(s)
PR 8
32 site(s)
PR 7
256 site(s)
PR 6
778 site(s)
PR 5
1901 site(s)

PHP News