Tutorials > Adobe Dreamweaver > Tutorial #171
Insert Data Into Multiple Tables
Level: Intermediate
Requirements: DreamweaverMX, Access2000
Language: ASP VBScript
Introduction
In this tutorial, you will learn how to construct simple SQL to enable you to insert multiple linked records into multiple tables. As this is an intermediate level tutorial, an understanding of how to set up a dynamic site on DreamweaverMX, create recordsets, recordset binding and repeat region creation is assumed. An understanding of SQL will be handy but not necessary for this tutorial.
Creating the tables.
As with some of my other tutorials, we are going to use the movies theme. For this tutorial you are going to need the following five tables.
tblMovies
- MovieID (Primary Key, Autonumber)
- Movie (Text)
- MovieChecksum (Text, Length:255)
tblMovieTypes
- MovieTypeID (PK, AN)
- MovieType (Text)
tblMovieTypeGroups
- MovieTypeGroupID (PK, AN)
- MovieID (Number)
- MovieTypeID (Number)
tblMovieFormat
- MovieFormatID (PK, AN)
- MovieFormat (Text)
tblMovieFormatGroups
- MovieFormatGroupID (PK, AN)
- MovieID (Number)
- MovieFormat (Number)
For this example, we will need to enter some data into the tblMovieTypes and tblMovieFormats tables. I have entered the following data for this tutorial.
tblMovieTypes
MovieTypeID, MovieType
1, Sci-Fi
2, Horror
3, Drama
4, Comedy
5, Thriller
6, Documentary
7, Fantasy
8, Western
9, War
tblMovieFormats
MovieFormatID, MovieFormat
1, DVD
2, Video
3, PSP
So now we have our table layouts and our data in the tables to start us off with.
| Tutorial By | Submitted On | Views | Rating |
|---|---|---|---|
| Rob Boyle | 29/03/2007 | 4761 | Not Yet Rated Rate Tutorial |
