ASP 101 - Active Server Pages 101 - Web04
The Place ASP Developers Go!

Please visit our partners

Windows Technology Windows Technology
15 Seconds
ASP 101
ASP Wire
VB Forums
VB Wire
internet.commerce internet.commerce
Partners & Affiliates

ASP 101 is an site
ASP 101 is an site
Internet News
Small Business
Personal Technology

Corporate Info
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash

Script Output:
Send Me Updates:

ASP HTML Download            FAQ

This sample builds upon our Checkbox Sample by showing you how to save checkbox data to a database.

Since a checkbox only has two possible states (checked or unchecked) it makes the most sense to store it in your database as a boolean value. Now whether checked means True or False is up to you and what your data actually means, but for the purposes of this sample, we'll assume that a checked checkbox corresponds to a database value of True.

This sample isn't really about the database connectivity side of things. For more information about setting up a connection string or building a SQL query, you'll want to take a look at some of our database samples. To keep things simple, I don't actually connect to a database in this code. Instead, I create and update an in-memory recordset. The code which connects the recordset to the form and updates the data in the recordset is the same as it would be if it was connected to an Access or SQL Server database. The benefit of doing it this way is that you can download and play with the code without having to go through all the trouble of downloading and setting up an accompanying database.


Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback
The Network for Technology Professionals



Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers