Multiple inserts

  • Hi guys!  It's me again....stop cringing!

    I completed the script...but it's still giving me a "page cannot be displayed" error.   I've checked all the spellings and stuff, and couldn't find any obvious mistakes.

     

    Here is the full script. 

    Note: this script runs when the user hits the 'submit' button on the final form.

    -------------BEGIN SCRIPT---------------

    <%

    <!--- #include file="..path/adovbs.inc" -->

    strSchoolReqDate=Request.Form("reg_req_date")

    strSchoolFname=Request.Form("reg_fname")

    strSchoolLname=Request.Form("reg_lname")

    strSchoolCompany=Request.Form("reg_company")

    strSchoolBoffice=Request.Form("reg_boffice")

    strSchoolAdd1=Request.Form("reg_add1")

    strSchoolAdd2=Request.Form("reg_add2")

    strSchoolCity=Request.Form("reg_city")

    strSchoolState=Request.Form("reg_state")

    strSchoolZip=Request.Form("reg_zip")

    strSchoolPhone=Request.Form("reg_phone")

    strSchoolFax=Request.Form("reg_fax")

    strSchoolEmail=Request.Form("reg_email")

    strSchoolRegion=Request.Form("reg_region")

    strSchoolSupervisor=Request.Form("reg_supervisor")

    strSchoolClaimType=Request.Form("reg_claimtype")

    strSchoolDate=Request.Form("reg_date")

    strSchoolInsured=Request.Form("reg_insured")

    strSchoolClaimNum=Request.Form("reg_claim_num")

    strSchoolPackaging=Request.Form("reg_packaging")

    strSchoolContact=Request.Form("reg_contact")

    strClaimFname=Request.Form("claim_fname")

    strClaimMname=Request.Form("claim_mname")

    strClaimLname=Request.Form("claim_lname")

    strClaimOffice=Request.Form("claim_office")

    strClaimAdd1=Request.Form("claim_add1")

    strClaimAdd2=Request.Form("claim_add2")

    strClaimCity=Request.Form("claim_city")

    strClaimState=Request.Form("claim_state")

    strClaimZip=Request.Form("claim_zip")

    strClaimPhone=Request.Form("claim_phone")

    strClaimDOB=Request.Form("claim_dob")

    strClaimSSN=Request.Form("claim_ssn")

    strClaimSex=Request.Form("claim_sex")

    strClaimMaritalStatus=Request.Form("claim_marital_status")

    strClaimSpouse=Request.Form("claim_spouse")

    strClaimNumChildren=Request.Form("claim_num_children")

    strClaimChildAge=Request.Form("claim_child_age")

    strClaimRace=Request.Form("claim_race")

    strClaimHeightLow=Request.Form("claim_height_low")

    strClaimHeightHigh=Request.Form("claim_height_high")

    strClaimWeightLow=Request.Form("claim_weight_low")

    strClaimWeightHigh=Request.Form("claim_weight_high")

    strClaimCharacteristics=Request.Form("claim_characterisitics")

    strClaimOccupation=Request.Form("claim_occupation")

    strClaimInjury=Request.Form("claim_injury")

    strClaimRestrictions=Request.Form("claim_restrictions")

    strClaimRepresentation=Request.Form("claim_representation")

    strClaimMake1=Request.Form("claim_make1")

    strClaimModel1=Request.Form("claim_model1")

    strClaimTag1=Request.Form("claim_tag1")

    strClaimMake2=Request.Form("claim_make2")

    strClaimModel2=Request.Form("claim_model2")

    strClaimTag2=Request.Form("claim_tag2")

    strEmpEmployer=Request.Form("emp_employer")

    strEmpFname=Request.Form("emp_fname")

    strEmpLname=Request.Form("emp_lname")

    strEmpAdd1=Request.Form("emp_add1")

    strEmpAdd2=Request.Form("emp_add2")

    strEmpCity=Request.Form("emp_city")

    strEmpState=Request.Form("emp_state")

    strEmpZip=Request.Form("emp_zip")

    strEmpPhone=Request.Form("emp_phone")

    strEmpContact=Request.Form("emp_contact")

    strEmpInfo=Request.Form("emp_info")

    strCollegeFname=Request.Form("att_fname")

    strCollegeLname=Request.Form("att_lname")

    strCollegeAdd1=Request.Form("att_add1")

    strCollegeAdd2=Request.Form("att_add2")

    strCollegeCity=Request.Form("att_city")

    strCollegeState=Request.Form("att_state")

    strCollegeZip=Request.Form("att_zip")

    strCollegePhone=Request.Form("att_phone")

    strCollegeCopyOnReports=Request.Form("att_copy_reports")

    strCollegeContact=Request.Form("att_contact")

    strCollegeInfo=Request.Form("att_info")

    strBuildingCompany=Request.Form("building_company")

    strBuildingFname=Request.Form("building_fname")

    strBuildingLname=Request.Form("building_lname")

    strBuildingAdd1=Request.Form("building_add1")

    strBuildingAdd2=Request.Form("building_add2")

    strBuildingCity=Request.Form("building_city")

    strBuildingState=Request.Form("building_state")

    strBuildingZip=Request.Form("building_zip")

    strBuildingPhone=Request.Form("building_phone")

    strBuildingContact=Request.Form("building_contact")

    strBuildingInfo=Request.Form("building_info")

    strPhysFname=Request.Form("phys_fname")

    strPhysLname=Request.Form("phys_lname")

    strPhysAdd1=Request.Form("phys_add1")

    strPhysAdd2=Request.Form("phys_add2")

    strPhysCity=Request.Form("phys_city")

    strPhysState=Request.Form("phys_state")

    strPhysZip=Request.Form("phys_zip")

    strPhysPhone=Request.Form("phys_phone")

    strPhysContact=Request.Form("phys_contact")

    strPhysInfo=Request.Form("phys_info")

    strSpecReason=Request.Form("spec_reason")

    strSpecObj1=Request.Form("spec_obj1")

    strSpecObj2=Request.Form("spec_obj2")

    strSpecObj3=Request.Form("spec_obj3")

    strSpecBudget=Request.Form("spec_budget")

    strSpecSingleDay=Request.Form("spec_single_day")

    strSpecSceneInv=Request.Form("spec_scene_inv")

    strSpecActCheck=Request.Form("spec_act_check")

    strSpecResCheck=Request.Form("spec_res_check")

    strSpecMultiDay=Request.Form("spec_multi_day_surv")

    strSpecStatement=Request.Form("spec_statement")

    strSpecBgCheck=Request.Form("spec_bg_check")

    strSpecWidowCheck=Request.Form("spec_widow_check")

    strSpecHospitalCanvass=Request.Form("spec_hospital_canvass")

    strSpecDueDate=Request.Form("spec_due_date")

    strSpecComments=Request.Form("spec_comments")

    Dim MyCn

    Set MyCn = Server.CreateObject("ADODB.Connection")

    Set MyCmd = Server.CreateObject("ADODB.Command")

    MyCn.Open = "DSN=OSUNet;UID=xxxx;PWD=xxxxxxxx"

    Set MyCMd.ActivateConnection = MyCn

    MyCmd.CommandType = adCmdStoredProc

    MyCmd.CommandText = "dbo.sp_biginsert"

    MyCmd.Execute

    Dim MyCmd

    SET MyCmd = SERVER.CREATEOBJECT ("ADODB.Command")

    MyCmd.CommandText = "dbo.sp_biginsert"

    MyCmd.CommandType = adCmdStoredProc

    Dim MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Direction = adParamReturnValue

    MyParam.Name = "@Return"

    MyParam.Type = adInteger

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRschoolDate"

    MyParam.Value = strSchoolReqDate

    MyParam.Size = 50

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRschoolNameFirst"

    MyParam.Value = strSchoolFname

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRschoolNameLast"

    MyParam.Value = strSchoolLname

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRschoolCompany"

    MyParam.Value = strSchoolCompany

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRschoolBranch"

    MyParam.Value = strSchoolBoffice

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRschoolAddress1"

    MyParam.Value = strSchoolAdd1

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRschoolAddress2"

    MyParam.Value = strSchoolAdd2

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRschoolCity"

    MyParam.Value = strSchoolCity

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRschoolState"

    MyParam.Value = strSchoolState

    MyParam.Size = 10

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRschoolZip"

    MyParam.Value = strSchoolZip

    MyParam.Size = 20

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRschoolPhone"

    MyParam.Value = strSchoolPhone

    MyParam.Size = 35

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRschoolFax"

    MyParam.Value = strSchoolFax

    MyParam.Size = 35

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRschoolEmail"

    MyParam.Value = strSchoolEmail

    MyParam.Size = 50

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRschoolRegion"

    MyParam.Value = strSchoolRegion

    MyParam.Size = 75

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRschoolSupervisor"

    MyParam.Value = strSchoolSupervisor

    MyParam.Size = 75

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRschoolclaimType"

    MyParam.Value = strSchoolClaimType

    MyParam.Size = 50

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRschoolDateOfLoss"

    MyParam.Value = strSchoolDate

    MyParam.Size = 50

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRschoolInsured"

    MyParam.Value = strSchoolInsured

    MyParam.Size = 50

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRschoolClaimNumber"

    MyParam.Value = strSchoolClaimNum

    MyParam.Size = 50

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRschoolPackaging"

    MyParam.Value = strSchoolPackaging

    MyParam.Size = 50

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRschoolContactPrefs"

    MyParam.Value = strSchoolContact

    MyParam.Size = 50

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantNameFirst"

    MyParam.Value = strClaimFname

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantNameMiddle"

    MyParam.Value = strClaimMname

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantNameLast"

    MyParam.Value = strClaimLname

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantOffice"

    MyParam.Value = strClaimOffice

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantAddress1"

    MyParam.Value = strClaimAdd1

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantAddress2"

    MyParam.Value = strClaimAdd2

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantCity"

    MyParam.Value = strClaimCity

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantState"

    MyParam.Value = strClaimState

    MyParam.Size = 10

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantZip"

    MyParam.Value = strClaimZip

    MyParam.Size = 20

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantPhone"

    MyParam.Value = strClaimPhone

    MyParam.Size = 35

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantDateOfBirth"

    MyParam.Value = strClaimDOB

    MyParam.Size = 50

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantSSN"

    MyParam.Value = strClaimSSN

    MyParam.Size = 10

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantSex"

    MyParam.Value = strClaimSex

    MyParam.Size = 10

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantMaritalStatus"

    MyParam.Value = strClaimMaritalStatus

    MyParam.Size = 10

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantSpouse"

    MyParam.Value = strClaimSpouse

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantChildrenNum"

    MyParam.Value = strClaimNumChildren

    MyParam.Size = 15

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantChildrenAges"

    MyParam.Value = strClaimChildAge

    MyParam.Size = 25

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantRace"

    MyParam.Value = strClaimRace

    MyParam.Size = 75

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantHeightLow"

    MyParam.Value = strClaimHeightLow

    MyParam.Size = 75

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantHeightHigh"

    MyParam.Value = strClaimHeightHigh

    MyParam.Size = 75

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantWeightLow"

    MyParam.Value = strClaimWeightLow

    MyParam.Size = 75

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantWeightHigh"

    MyParam.Value = strClaimWeightHigh

    MyParam.Size = 75

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantSpecialChar"

    MyParam.Value = strClaimSpecialChar

    MyParam.Size = 500

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantOccupation"

    MyParam.Value = strClaimOccupation

    MyParam.Size = 50

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantInjury"

    MyParam.Value = strClaimInjury

    MyParam.Size = 500

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantRestrictions"

    MyParam.Value = strClaimRestrictions

    MyParam.Size = 500

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantRepresented"

    MyParam.Value = strClaimRepresented

    MyParam.Size = 75

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantVehicle1Make"

    MyParam.Value = strClaimMake1

    MyParam.Size = 75

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantVehicle1Model"

    MyParam.Value = strClaimModel1

    MyParam.Size = 75

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantVehicle1Tag"

    MyParam.Value = strClaimTag1

    MyParam.Size = 75

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantVehicle2Make"

    MyParam.Value = strClaimMake2

    MyParam.Size = 75

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantVehicle2Model"

    MyParam.Value = strClaimModel2

    MyParam.Size = 75

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRclaimantVehicle2Tag"

    MyParam.Value = strClaimTag2

    MyParam.Size = 75

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRsubjectEmployer"

    MyParam.Value = strEmpEmployer

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SREmployerNameFirst"

    MyParam.Value = strEmpFname

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SREmployerNameLast"

    MyParam.Value = strEmpLname

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SREmployerAddress1"

    MyParam.Value = strEmpAdd1

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SREmployerAddress2"

    MyParam.Value = strEmpAdd2

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SREmployerCity"

    MyParam.Value = strEmpCity

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SREmployerState"

    MyParam.Value = strEmpState

    MyParam.Size = 10

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SREmployerZip"

    MyParam.Value = strEmpZip

    MyParam.Size = 20

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SREmployerPhone"

    MyParam.Value = strEmpPhone

    MyParam.Size = 35

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SREmployerContact"

    MyParam.Value = strEmpContact

    MyParam.Size = 3

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SREmployerInfo"

    MyParam.Value = strEmpInfo

    MyParam.Size = 500

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRcollegeNameFirst"

    MyParam.Value = strCollegeFname

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRcollegeNameLast"

    MyParam.Value = strCollegeLname

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRcollegeAddress1"

    MyParam.Value = strCollegeAdd1

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRcollegeAddress2"

    MyParam.Value = strCollegeAdd2

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRcollegeCity"

    MyParam.Value = strCollegeCity

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRcollegeState"

    MyParam.Value = strCollegeState

    MyParam.Size = 10

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRcollegeZip"

    MyParam.Value = strCollegeZip

    MyParam.Size = 20

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRcollegePhone"

    MyParam.Value = strCollegePhone

    MyParam.Size = 35

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRcollegeCopyOnReports"

    MyParam.Value = strCollegeCopyOnReports

    MyParam.Size = 3

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRcollegeContact"

    MyParam.Value = strCollegeContact

    MyParam.Size = 3

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRcollegeInfo"

    MyParam.Value = strCollegeInfo

    MyParam.Size = 500

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRbuildingCompany"

    MyParam.Value = strBuildingCompany

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRbuildingNameFirst"

    MyParam.Value = strBuildingFname

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRbuildingNameLast"

    MyParam.Value = strBuildingLname

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRbuildingAddress1"

    MyParam.Value = strBuildingAdd1

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRbuildingAddress2"

    MyParam.Value = strBuildingAdd2

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRbuildingCity"

    MyParam.Value = strBuildingCity

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRbuildingState"

    MyParam.Value = strBuildingState

    MyParam.Size = 10

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRbuildingZip"

    MyParam.Value = strBuildingZip

    MyParam.Size = 20

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRbuildingPhone"

    MyParam.Value = strBuildingPhone

    MyParam.Size = 35

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRbuildingContact"

    MyParam.Value = strBuildingContact

    MyParam.Size = 3

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRbuildingInfo"

    MyParam.Value = strBuildingInfo

    MyParam.Size = 500

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRphysicianNameFirst"

    MyParam.Value = strPhysFname

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRphysicianNameLast"

    MyParam.Value = strPhysLname

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRphysicianAddress1"

    MyParam.Value = strPhysAdd1

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRphysicianAddress2"

    MyParam.Value = strPhysAdd2

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRphysicianCity"

    MyParam.Value = strPhysCity

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRphysicianState"

    MyParam.Value = strPhysState

    MyParam.Size = 10

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRphysicianZip"

    MyParam.Value = strPhysZip

    MyParam.Size = 20

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRphysicianPhone"

    MyParam.Value = strPhysPhone

    MyParam.Size = 35

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRphysicianContact"

    MyParam.Value = strPhysContact

    MyParam.Size = 3

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRphysicianInfo"

    MyParam.Value = strPhysInfo

    MyParam.Size = 500

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRreason"

    MyParam.Value = strSpecReason

    MyParam.Size = 500

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRobjective1"

    MyParam.Value = strSpecObj1

    MyParam.Size = 500

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRobjective2"

    MyParam.Value = strSpecObj2

    MyParam.Size = 500

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRobjective3"

    MyParam.Value = strSpecObj3

    MyParam.Size = 500

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRbudgetAmount"

    MyParam.Value = strSpecBudget

    MyParam.Size = 10

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRsingleDaySurv"

    MyParam.Value = strSpecSingleDate

    MyParam.Size = 10

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRsceneInvestigation"

    MyParam.Value = strSpecSceneInv

    MyParam.Size = 10

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRactivityCheck"

    MyParam.Value = strSpecActCheck

    MyParam.Size = 10

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRresidencyCheck"

    MyParam.Value = strSpecResCheck

    MyParam.Size = 10

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRmultidaySurv"

    MyParam.Value = strSpecMultiDay

    MyParam.Size = 10

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRstatement"

    MyParam.Value = strSpecStatement

    MyParam.Size = 500

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRbackgroundCheck"

    MyParam.Value = strSpecBgCheck

    MyParam.Size = 10

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRwidowCheck"

    MyParam.Value = strSpecWidowCheck

    MyParam.Size = 10

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRhospitalCanvass"

    MyParam.Value = strSpecHospitalCanvass

    MyParam.Size = 10

    MyParam.Direction = adParamInput

    MyParam.Type = adChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRdueDate"

    MyParam.Value = strSpecDueDate

    MyParam.Size = 50

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRcomments"

    MyParam.Value = strSpecComments

    MyParam.Size = 500

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    MyCmd.Parameters.Append MyParam

    MyCn.Open

    MyCmd.ActiveConnection = MyCn

    MyCmd.Execute

    MyCn.Close

    ReturnValue = CInt(MyCmd.Parameters("@Return").Value)

    Set MyParam = Nothing

    Set MyCmd = Nothing

    %>

    ------------END SCRIPT------------------

  • What line is the error on??

    To find out, you can comment out some part of the code untill you get no error, that will tell you where the error is.

  • Thanks Remi,  I will try that.

    BTW, does the code look right?  At least from glancing at it?

     

  • the only missing thing is that you don't account for nulls, and that you don't trim the values from the request.querystring (small bug that can bit you).

  •  

    How can I account for nulls with a script like this?

    Can I use trim() to trim the stuff from request.form?

     

  • if the value is "", then a null should be entered in the db, trim will do just fine.

  • I don't see how I can insert a null with the code you provided...I don't see how it would fit into the structure/flow of the code.

     

     

  • This is something I didn't implement in my code generator but you might skip it for now :

    if strSpecComments = "" Then

    MyParam.Value = null

    else

    MyParam.Value = strSpecComments

    end if

  • You could also wrap that into a function and call it... that'd save you a lot of code to write.

  • so....

     

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRcomments"

    MyParam.Value=NullFunction(strSpecComments)

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    and the function would be like what you have above?

    Function SetVars(SRvalue)

    if SRvalue = "" Then

    MyParam.Value = null

    else

    MyParam.Value = SRvalue

    end if

    End Function

  • Function SetVars(SRvalue)

    if SRvalue = "" Then

    SetVars = null

    else

    SetVars = SRvalue

    end if

    End Function

  • Wow, this script is getting long with all those Trim() statements!

     

    Anyway...I'm now getting a different error:

    Error 500: Internal Server Error

  • it is not adding any lines of code... you're jut wrapping the inititalisation of variable with trim(request...)

  • I am doing it this way...is there a better(faster) way of doing it?

    strSchoolDate=Request.Form("school_date")

    strSchoolDate=Trim(strSchoolDate)

    ...for each line.

     

     

  • strSchoolDate=trim(Request.Form("school_date"))

Viewing 15 posts - 121 through 135 (of 167 total)

You must be logged in to reply to this topic. Login to reply