Page 302 - DCAP408_WEB_PROGRAMMING
P. 302
Web Programming Kumar Vishal, Lovely Professional University
Notes Unit 14: Database Connectivity
CONTENTS
Objectives
Introduction
14.1 Open and Close a Connection
14.1.1 DSN Less
14.1.2 Closing the Connection
14.2 Reading Records from Database
14.2.1 Reading Records with ADO
14.3 Inserting, Updating and Deleting Database Records
14.3.1 Inserting Records
14.3.2 ASP Database Updating Existing Records
14.3.3 ASP Database — Deleting Information
14.4 Building Database Application using ADO
14.5 Summary
14.6 Keywords
14.7 Review Questions
14.8 Further Readings
Objectives
After studying this unit, you will be able to:
Recognize opening and closing of connection
Describe reading from the database
Demonstrate the inserting, deleting and updating the database records
Build database application using active objects
Introduction
Inserting Records (Lock Types, Add New and Update); Updating Records, Deleting Records,
The real power of data driven Websites comes from the capability to add and change data in your
pages. To understand the concept of insertion, deletion and updation we will create a new table
called tbluser which will have the fields First Name, Last Name, Email, Username and Password.
14.1 Open and Close a Connection
Once you have designed you database the next step will be to create a DSN less entry, UserDB1.
To do this:
Click on your “Start” Button, and go to Control Panel under Settings.
Click on “32 ODBC”, select “System DSN less”
296 LOVELY PROFESSIONAL UNIVERSITY