Y.-H. Chen International College Ming-Chuan University Fall, 2004

Slides:



Advertisements
Similar presentations
Creating a Login Process Creating a users table and a login form that denies access to unauthorized users.
Advertisements

MS-Access XP Lesson 1. Introduction to MS-Access Database Management System Software (DBMS) Store data in databases Database is a collection of table.
Access Lesson 2 Creating a Database
Access - Project 1 l What Is a Database? –A Collection of Data –Organized in a manner to allow: »Access »Retrieval »Use of That Data.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Database A collection of related information stored on a computer and organized in a manner that allows access, retrieval, and use of that data.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
ISP 121 Week 1 Introduction to Databases. ISP 121, Winter Why a database and not a spreadsheet? You have too many separate files or too much data.
Access Tutorial 1 Creating a Database
COMPREHENSIVE Access Tutorial 2 Building a Database and Defining Table Relationships.
FIRST COURSE Access Tutorial 2 Building a Database and Defining Table Relationships.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Figure 1. Hit analysis in 2002 of database-driven web applications Hits by Category in 2002 N = 73,873 Results Reporting 27% GME 26% Research 20% Bed Availability.
Tutorial 1 Creating a Database. Objectives Learn basic database concepts and terms Learn basic database concepts and terms Explore the Microsoft Access.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
Access Lesson 2 Creating a Database
Creating a Survey Using Dreamweaver’s Record Insertion Form Wizard.
XP Chapter 2 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Building The Database Chapter 2 “It is only the farmer.
® Microsoft Office 2013 Access Building a Database and Defining Table Relationships.
1 Databound Controls. 2 Objectives You will be able to use design time data binding to display and update SQL Server database data without writing any.
WEEK 11 Database Design. TABLE INSTANCE CHARTS Create Tables.
® Microsoft Office 2010 Building a Database and Defining Table Relationships.
Lesson 12 Adding Validation To The Movie Database.
Microsoft Access 2010 Chapter 10 Administering a Database System.
® Microsoft Office 2013 Access Creating a Database.
COMPREHENSIVE Access Tutorial 12 Managing and Securing a Database.
® Microsoft Access 2010 Tutorial 12 Managing and Securing a Database.
® IBM Software Group © 2006 IBM Corporation Using JSF Mini-Calendar Controls This section describes how to use a JSF Mini-Calendar Control with EGL It.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 25.1 Test-Driving the ATM Application 25.2.
Planning & Creating a Database By Ms. Naira Microsoft Access.
INTRODUCTION TO ACCESS. OBJECTIVES  Define the terms field, record, table, relational database, primary key, and foreign key  Create a blank database.
Pasewark & Pasewark 1 Access Lesson 2 Creating a Database Microsoft Office 2007: Introductory.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
McGraw-Hill Career Education© 2008 by the McGraw-Hill Companies, Inc. All Rights Reserved. Concept 1 Database – Organized collection of related information.
MSOffice Access Microsoft® Office 2010: Illustrated Introductory 1 Part 1 ® Database & Table.
Week 1 Intro to the Course Intro to Databases.  Formerly ISP 121  “Continuation” of LSP 120 concepts  Topics include: ◦ Databases ◦ Basic statistics.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 1 Creating and Using a Database.
1 Project 6: Northwind Orders. 2 The Northwind Traders Database The Northwind Traders database was created by Microsoft for training and demonstration.
1 Database Systems Introduction to Microsoft Access Part 1.
ASP.NET Programming with C# and SQL Server First Edition
Access Tutorial 2 Building a Database and Defining Table Relationships
Tutorial 1 Creating a Database
Access Tutorial 1 Creating a Database
Practical Office 2007 Chapter 10
Basic Database Concepts
Objectives Create an action query to create a table
Database application MySQL Database and PhpMyAdmin
Mail Merge And Macros in MS WORD
Access Creating a Database
Creating and Using a Database
Chapter 4 MS ACCESS DATABASE.
Access Creating a Database
Contact QuickBooks File Doctor
Setting the Permissions
Access Tutorial 1 Creating a Database
MODULE 7 Microsoft Access 2010
Creating and Modifying Queries
PHPMyAdmin.
Access Lesson 2 Creating a Database
Access Lesson 2 Creating a Database
Access Tutorial 1 Creating a Database
Access Tutorial 2 Building a Database and Defining Table Relationships
Access Tutorial 2 Building a Database and Defining Table Relationships
Working With Databases
Access Tutorial 1 Creating a Database
Access Tutorial 1 Creating a Database
Grauer and Barber Series Microsoft Access Chapter Two
Tutorial 9 Using Action Queries and Advanced Table Relationships
Tutorial 12 Managing and Securing a Database
Presentation transcript:

Y.-H. Chen International College Ming-Chuan University Fall, 2004 ADO Add Y.-H. Chen International College Ming-Chuan University Fall, 2004

ADO Add Records We may use the SQL INSERT INTO command to add a record to a table in a database.

Add a Record to a Table in a Database

Add a Record to a Table in a Database We want to add a new record to the Customers table in the Northwind database. We first create a form that contains the fields we want to collect data from. When the user presses the submit button the form is sent to a file called "demo_add.asp". The "demo_add.asp" file contains the code that will add a new record to the Customers table.

Add a Record to a Table in a Database

Important If you use the SQL INSERT command be aware of the following: If the table contains a primary key, make sure to append a unique, non-Null value to the primary key field (if not, the provider may not append the record, or an error occurs) If the table contains an AutoNumber field, do not include this field in the SQL INSERT command (the value of this field will be taken care of automatically by the provider)

What about Fields With no Data? In a MS Access database, you can enter zero-length strings ("") in Text, Hyperlink, and Memo fields IF you set the AllowZeroLength property to Yes. Note: Not all databases support zero-length strings and may cause an error when a record with blank fields is added. It is important to check what data types your database supports.

Read this First If you try to update the database, you will get the error message: "You do not have permission to update this database". You get this error because you don't have write access to our server. BUT, if you copy the code and run it on your own system, you might get the same error. That is because the system might see you as an anonymous internet user when you access the file via your browser. In that case, you have to change the access-rights to get access to the file.

How to change the access-rights of your Access database? Open Windows Explorer, find the .mdb file. Right-click on the .mdb file and select Properties. Go to the Security tab and set the access-rights here.