[WEB4LIB] sql help - asp application
araby at unr.edu
Mon Nov 25 19:28:52 EST 2002
Here is one way to update a main table and child tables with MS Access and
Delare a variable for the primary key (e.g., DeptID)and set it from the form
Open and update the main table.
[error check here if you use one]
rs.close [Close the main table record set, but reuse the
rs.source = "firstchildtable" [reuse the recordset object]
Delete the old child records matching the primary key.
Then add the new choices.
If there are multiple new child records to add, you can loop through them
After you rs.update
[error check here]
rs.source = "nextchildtable"
and so on
Close rs and Conn and set to nothing as usual.
I'll send you a script that I use to process a form that has a main table
and 4 child tables with one to many relationships for each.
Hope this gives you some ideas.
Web Development Librarian
University of Nevada, Reno
araby at unr.edu
----- Original Message -----
From: "Mary Beth Faccioli" <mbfaccioli at yahoo.com>
To: "Multiple recipients of list" <web4lib at webjunction.org>
Sent: Monday, November 25, 2002 11:20 AM
Subject: [WEB4LIB] sql help - asp application
> Hi all,
> I am developing a database driven web application
> using ASP/IIS/Access where users (librarians) will be
> inputting data (about instruction sessions) from a
> form. The database has several tables that populate
> drop-down boxes on this form. For example, there is a
> table that lists different university departments and
> is connected to the main table via a DeptID field.
> I am trying to use sql INSERT INTO in the form
> processing but am having trouble figuring this out
> because there are 5 tables to be joined when the user
> submits the form. Are there any good online resources
> that would deal with this - I have seen some basic
> things but nothing that deals with pulling together
> this many tables. I know this has to go on all the
> time with database driven applications. Can anyone
> Thanks in advance,
> Mary Beth Faccioli
> Web Specialist
> Georgia State University Pullen Library
> 100 Decatur Street SE
> Atlanta, GA 30303
> mbfaccioli at yahoo.com
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
More information about the Web4lib