Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
gmag47
Starting Member
3 Posts |
Posted - 2005-11-01 : 16:06:43
|
| Hello,I am trying the sum total from two different tables and than have them post a my web report form, can someone check my code and see what the problem is and what I need to do tomake my form work:[code]<FORM name="Merit_Principle.asp" method="post" action="Merit_Principle_Report.asp?action=submit"><%If Request.Querystring("action")="submit" Thenset conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open Server.MapPath("../HCMAP.mdb")strSQL = "Select (average(Merit_Principle) + average(Merit_Promotion)) as Grandtotal from sum1 inner join sum2 on key1 = key2"dim intAdditiondim Average Average = Request.Form("1_Recruitment_was_appropriately_targeted") &Request.Form("2_Recruitment_produced_sufficient number_of_status_applicants")&Request.Form("3_Recruitment_produced_sufficient_number_of_non_st atus_applicant")&Request.Form("4_Certificate_referral_list_was_issued_in_a_timely _manner")&Request.Form("5_Length_of_open_period_for_announcement_was_reaso nable_based_on_the_type_of_job_number_of_potential _candidates")&Request.Form("6_Operational_procedures_addressed_issues_of_tardy _applicatons")&Request.Form("7_If_applicable_late_applications_from_10_point_ve rterans_preference_eligibles_are_maintained")&Request.Form("8_These_applications_were_notified_within_appropri ate_time_frame")&Request.Form("7_If_applicable_late_applications_from_10_point_ve rterans_preference_eligibles_are_maintained")&Request.Form("9_KSAs_crediting_plans_are_based_on_the_job_requir ements_and_were_effective_in_identifying_best_qual ified_candidates")&Request.Form("10_CTAP_ICTAP_RPL_candidates_received_proper_consi deratione_eligibles_are_maintained")&Request.Form("11_If_applicable_recruitment_adheres_to_ACWA_Lueva no_Consent_Decree_regulatory_compliance") ' add an fn for each of your form fieldsconn.Execute strSQLconn.Close'Response.Redirect("Comments.asp")End If%>[code]Glen S. Magwood Sr |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2005-11-01 : 16:18:12
|
| What problem are you having? Sql errors? asp errors? incorrect results?if it's sql errors or incorrect results, capture the sql code sent to the db server using sql profiler. If you can't tell what's wrong with the captured code, post it.EDIT:Oh, I see you're connecting to MS Access. Sorry I can't help you. If no one else responds, you might try the MS Access forum.Be One with the OptimizerTG |
 |
|
|
|
|
|