Advertisement

04.29.2008 at 01:30PM PDT, ID: 23363550
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.7

Inserting across multiple tables from one ASP form

Asked by dskllp in Active Server Pages (ASP), Miscellaneous Web Development, VB Script

Tags: ,

I need to write data from an ASP/VBscript form to two tables simultaneously. One of the tables is selected dynamically according to a user's selection. This is for a word processing pool at a law office.

The user passes information through the forms and the script in the page reads the query string, where two things have to happen:

#1: The user's information and the new job number has to be written to Job_Main, which is the control table. The job number is the key between the tables. (this part is just a simple "insert" and I have it handled)

#2: The job description/details have to be written to the appropriate Job_[Type] table. Each job has different parameters and requirements, so one generic table doesn't work. Handling this dynamically and getting everything written to both tables is what I need to figure out.

The Case statement attached here looks at the "JobQueryString" variable , determining which job type, and therefore which table to write to. The "WriteJobTable" variable shows the names of the tables in the SQL database.

There is a "WriteMainTable" variable in the Case statement - it is superfluous.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
'-----------------------------------
' determine the type of job
' ----------------------------------
 
Select Case JobQueryString
	Case "CD_Burn"
		JobDisplay="CD Burn"
		WriteMainTable=""
		WriteJobTable="Job_CDBurn"
		
	Case "New_Doc"
		JobDisplay="Create new document or input"
		WriteMainTable=""
		WriteJobTable="Job_New_Material"
		
	Case "New_Charts"
		JobDisplay="Create or Edit Charts (Excel/Power Point)"
		WriteMainTable=""
		WriteJobTable="Job_Charts"
		
	Case "Shells"
		JobDisplay="Discovery Shell Setup"
		WriteMainTable=""
		WriteJobTable="Job_Shells"
		
	Case "Revisions"
		JobDisplay="Light or heavy revisions"
		WriteMainTable=""
		WriteJobTable="Job_Revisions"
		
	Case "OCR_Scan"
		JobDisplay="OCR Scan & reformat new document"
		WriteMainTable=""
		WriteJobTable="Job_OCR_Scan"
		
	Case "TOA_TOC"
		JobDisplay="TOA / TOC"
		WriteMainTable=""
		WriteJobTable="Job_TOA_TOC"
		
	Case "Trans"
		JobDisplay="Transcription work"
		WriteMainTable=""
		WriteJobTable="Job_Transcription"
		
	Case "PrintJob"
		JobDisplay="Print Job"
		WriteMainTable=""
		WriteJobTable="Job_Print"
		
	Case "Other"
		JobDisplay="Other task (to be specified in details)"
		WriteMainTable=""
		WriteJobTable="Job_CDBurn"
		
End Select
[+][-]04.30.2008 at 02:37AM PDT, ID: 21469162

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Active Server Pages (ASP), Miscellaneous Web Development, VB Script
Tags: ASP Vbscript 2.0 & SQL Server 2005; Dreamweaver CS3, (all)
Sign Up Now!
Solution Provided By: _Stilgar_
Participating Experts: 2
Solution Grade: B
 
 
[+][-]04.30.2008 at 02:54AM PDT, ID: 21469227

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04.30.2008 at 07:17AM PDT, ID: 21470870

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 07:43AM PDT, ID: 21471143

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 08:11AM PDT, ID: 21471432

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 08:32AM PDT, ID: 21471660

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628