Solved

Multiple HTML forms

Posted on 1998-06-19
8
136 Views
Last Modified: 2010-04-09
I currently have a form that inputs data into a  Access 97 database using ASP. My data is going into one table.

I want to set up a form that will submit to muliple tables at once, keeping the information linked.

For instance, I want to have a table that has student info, problem type, problem description. I want all the tables to be linked and accessibly when queried from the web site.

Your help is greatly appreciated.

0
Comment
Question by:jwilliams1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 1

Expert Comment

by:TAMC
ID: 1844252
All this requires is a good SQL statement.  Comment me back with the exact information you want displayed and the fields and tables to your database and I would be more then happy to write the SQL statement for you.
0
 

Author Comment

by:jwilliams1
ID: 1844253
TAMC,

These are the fields that I have in one table. I want to restructure them so that Only student information is in one table and the problem they encounter, the description, procedure observed, performed, and level of participation.

I am trying to make it easy in the long run.

You can take a look at my site:  http://134.129.166.97

User_Name MS_Year Campus_Location Clerkship_Rotation Setting Site_Name Patients_Age Patiens_Sex

General_Problems General_Problem_Notes Head_and_Neck_Notes Pediatric_Notes Level_of_Participation Level_of_Participation_Notes Cardiac_Problems Cardiac_Notes Head_and_Neck_Problems Pediatric_Problems Male_Repro_Problems Male_Repro_Notes Female_Repro_Problems Female_Repro_Notes Peripheral_Vascular_Problems Peripheral_Vascular_Notes Lower_GI_Problems Lower_GI_Notes Upper_GI_Problems Upper_GI_Notes Renal_System_Problems Renal_System_Notes Endocrinology_Problems Endocrinology_Notes Infectious_Disease_Problems Infectious_Disease_Notes Neurological_Problems Neurological_Notes Hematology_Problems Hematology_Notes Pulmonary_Problems Pulmonary_Notes Psychiatric_Problems Psychiatric_Notes Musculoskeletal_Problems Musculoskeletal_Notes Obstetrical_Problems Obstetrical_Notes Procedures_Performed Procedures_Performed_Notes Procedures_Observed Procedures_Observed_Notes

Let me know how this will work out.

Your help will be greatly appreciate.
0
 
LVL 1

Expert Comment

by:TAMC
ID: 1844254
Whoah, this is way out of my league, sorry for getting your hopes up, if I figure something out I'll tell, otherwise you probably won't be hearing from me.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:davejenkins
ID: 1844255
jwilliams,

A bit of JavaScript could handle this quite easily.  Are you familiar with it?  Basically, all we need to do is take all those variables from the form, and pass them into the three different databases using one function (call the function with the 'submit' box at the bottom of the page):

function sendData
 {
 var General_Problems = window.document.medform.general_problems.value
 var General_Problem_Notes = window.document.medform.general_problems_notes.value
 var Head_and_Neck_Notes = window.document.medform.head_and_neck_notes.value
 
 post first set of data to database A (asp string). . .
 post second set of data to database B (asp string). . .
   .
   .
   .
 }


Let me know if you want it scripted (it'll cost more than 30 points!)

Dave.
0
 

Author Comment

by:jwilliams1
ID: 1844256
Adjusted points to 50
0
 
LVL 28

Expert Comment

by:sybe
ID: 1844257
I would do it like this:

Your tables are linked, which would meant aht you have an unique identifier in the tables. I cannot find a "id" autonumber field in the fields you mentioned, but it might be there.

First you update the "main" table which probably holds the person's name and has a unique identifier which you use to link to other tables.

If the identifier is autonumber, then you'll have to find out what the new number is before you can update the other tables.

That can be done by updating the main table using an updatable recordset

Set RS = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * From TABLE1 ...."
RS.Open strSQL, Conn, 3, 3

RS.AddNew
'creates a new record

RS("field1")=Request.Form("formfield1")
.etc
' fills in the field values

RS.Update
'saves the recordset in the database

NewID = RS("ID")
' if ID is the name of the autonumber field

RS.Close

Now you have the value of the unique identifier and you can use that to update other tables.

This can be done in the same way


In fact you don't update all tables simultaneously, but one by one.















0
 

Expert Comment

by:avla
ID: 1844258

  Can you say why you rejected the attempts? Just didn't work or wasn't what you were looking for?

  a.
0
 
LVL 10

Accepted Solution

by:
MasseyM earned 50 total points
ID: 1844259
You can use SQL to update individual items in multiple table:

use something like this in SQL:

UPDATE Table1.Field1, Table1.Field2, Table2.Field1... WHERE Table1.Field1 = "this criteria"
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question