|
|
Database-related
ASP » Tips and Tutorials » Database-related
A D V E R T I S E M E N T
Today's Special: Get free Magazine from SAP!
Multiple Form Selection (Where In)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. Limit query results with the Recordset object - FreeHave this short program around so that you can quickly see what columns and what data are in your database. Here you will see some of the common methods and properties used to limit the results from your SQL query. Using a simple form that takes a table name and a submit button, and you can easily display increments of the table data. Full source code available. Creating a Simple SQL-Driven Web Site - FreeThis hands-on tutorial explains how to develop a simple SQL-driven web site in just minutes. Topics include: Our Database Design, Creating a Data Source, Inserting A Tip Into Our Database, Displaying and Deleting Tips, Searching the Database, and Displaying the Tips. Generating random records from the Database - FreeThis article shows how to generate random records from the database. Also explains how to generate random numbers. Sample Database and Code available for download. ASP-Database Transactions - FreeThis is an article on executing all or none database queries using ASP-Database transactions. Must read for ASP-Database developers. Sample Database and Code available for download. Speed up Database Access using GetRows - FreeThis is an article on using Recordset. It uses GetRows method to speedup database access. One of the fastest ways of displaying database records with ASP. Sample Database and Code available for download. Fun With Stored Procedures... - FreeThis is a brief and very useful tutorial on creating and using stored procedures with your asp applications. A stored procedure is nothing more than an sql statement stored inside a database. The database can be SQL Server or MS Access as well as others. A stored procedure is compiled by your database (for the most part) one time, when it is entered. This results in faster database executions and overall performance updates, and it further separates the sql statement from your asp leaving you with more readable code. This tutorial describes: What is a stored procedure?, Writing stored procedures, Getting the stored procedure into the database, Calling stored procedures in ASP pages, and Modifying and removing stored procedures. Search Within Search Results - FreeWant 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 a 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. Multiple Form Selection - FreeAllowing 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. Loading Text Files Into A Database - FreeThis short tutorial explains how to to upload a text file and load it into your database using ASP. It uses a sample of the space-delimited file for an example. Filtering and Sorting of Records in a Database - FreeLearn how to search and sort the records through the database. Step by step tutorial with Sample code and database available for download. Online demo also available. Using ASP pages to page through Recordset - FreeIn depth article on showing records in a page by page fashion with 'first page','next','back' and 'last page' links at the bottom to navigate through the records. Sample code and database available for download. Online demo also available. Get Your Data Faster with a Data Cache - FreeStoring frequently used lookup data in a database is a great idea (e.g. order status codes, state names, etc.) that saves tremendous amounts of time in design and maintenance. However, retrieving that data from the database every time it is needed is very inefficient. This article describes how to use Application variables to cache frequently used lookup data in memory to achieve lightning fast access times. Search db by Field - FreeProviding 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. Two Table Join - FreeOutputting data from two tables is almost as easy as displaying from one. This example utilizes two
tables with state information on them. The first table (state_order) contains state abbreviations (state), state names (statename) the year each state was admitted into the union (year) and the numeric order they entered in (entered). The second table (state_capitals) contains state abbreviations (state), state names (state) and state capitals (capital). The where statement looks to make a match on the field that each table has in common to ouput the correct capital with all the info from the state_order table. How to create a System DSN for Access database - FreeYou 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. Presentation Of Hierarchical Data - FreeMultiple level select boxes tackled with hierarchical data! This sample illustrates the concept using a hierarchy consisting of geographical region, country, and state data. The code expects a system DSN by name "Hierarchy" and accesses the database using the user id "sa" with a blank password. The database is created in SQL Server 7.0. Adding Records to a Database using SQL - FreeThe purpose of this article 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. Your First Database - FreeThis is a quite extensive tutorial on creating your first relational database application. Broken into four different lessons, it covers theories of relational databasing, defining and linking tables, connecting your database to your Web server, SQL, VBScript, and the ActiveX Data Objects (ADO, 2-D arrays, ASP stuff, how to make it work with HTML forms, and more. Connecting To A Database and Retrieving Results in 9 Easy Steps - FreeNow 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. I even removed the includes and everything.
|
A D V E R T I S E M E N T
|
Subscribe to SourceCodesWorld - Techies Talk |
| |
|