amaloo
08-01-2005, 10:09 PM
Hi I am getting this error :
Microsoft VBScript runtime error '800a01a8'
Object required
/jobapplicationd.asp, line 207
My code with line 207 highlighted and red.
<%
dim apno
apno = Session("ano")
if Request("submit")= "Reset" then
'if Request("submit")= "Submit" then
response.redirect "jobapplicationd.asp?ano=" & request.querystring("ano")
end if
if Request.ServerVariables("REQUEST_METHOD") = "POST" then
'dim cn
set cn = server.createobject("adodb.connection")
cn.Open MM_McKenna_STRING
'cn.open
'dim rs
'set rs = server.createobject("adodb.recordset")
dim rs
set rs = server.createobject("adodb.recordset")
rs.open "select App_no from application_master",cn,3,3
if rs.recordcount = 0 then
dim cnt
cnt = 1
else
rs.movelast
cnt = rs("App_no") + 1
end if
set rs=nothing
set rs = server.createobject("adodb.recordset")
'dim apno
'apno=request.querystring("idd")
'dim cn
dim errormsg,xvalid,cdate,start_date,zip,phone,emergency_phone,salary_desired
cdate=request.form("cdate")
start_date=request.form("date_you_start")
zip=request.form("Zip")
phone=request.form("phone")
emergency_phone=request.form("emergency_phone")
salary_desired=request.form("salary_desired")
dim cn
set cn = server.createobject("adodb.connection")
cn.Open MM_McKenna_STRING
'cn.open
dim g,h,z,t
g=request.form("grammar_no_year")
if g = "" then
g = 0
end if
h=request.form("highschool_no_year")
if h = "" then
h = 0
end if
z=request.form("College_no_year")
if z = "" then
z = 0
end if
t=request.form("trade_no_year")
if t = "" then
t = 0
end if
'LastName=Request.Querystring("hf1")
'response.write cnt
rs.open "insert into application_master values ('" & request.form("Last_name") & "','" & request.form("First_name") & "','" & request.form("Middle_name") & "','" & request.form("Social_security_no") & "','" &request.form("cdate") & "','" & request.form("Present_address") & "','" & request.form("City") & "','" & request.form("State") & "','" & request.form("Zip") & "','" & request.form("Phone_number") & "','" & request.form("email_address") & "','" & request.form("Em_name") & "','" & request.form("Em_number") & "','" & request.form("Other_name") & "','" & request.form("Other_name_detail") & "','" & request.form("sixty_old") & "','" & request.form("Speak") & "','" & request.form("Read") & "','" & request.form("Write") & "','" & request.form("Nolo_contendre") & "','" & request.form("Convicted_crime") & "','" & request.form("crime_detail") & "','" & request.form("Probation") & "','" & request.form("Deferred_judication") & "','" & request.form("lawsuit-question") & "','" & request.form("Pretrial_diversion") & "','" & request.form("Ordered_supervision_crime") & "','" & request.form("Served_detail") & "','" & request.form("Professional_license") & "','" & request.form("Misconduct_authority") & "','" & request.form("Claim_pending_Mckenna") & "','" & request.form("position_full") & "','" & request.form("position_parttime") & "','" & request.form("position_pooltime") & "','" & request.form("position_applied_for") & "','" & request.form("date_you_start") & "','" & Request.form("salary_desired") & "','" & request.form("8_hour_shift") & "','" & request.form("10_hour_shift") & "','" & request.form("12_hour_shift") & "','" & request.form("Days") & "','" & Request.form("Evenings") & "','" & request.form("nights") & "','" & request.form("Weekends_only") & "','" & request.form("weekedays_only") & "','" & request.form("weekend_weekday") & "','" & request.form("currently_employed") & "','" & request.form("check_current_employer")& "','" &request.form("Check_no_detail") & "','" & request.form("applied_mckenna_before") & "','" & request.form("Employed_mckenna_before") & "','" & request.form("reason_leaving") & "','" & request.form("grammar_school_name") & "','" & g & "','" & request.form("grammar_graduate") & "','" & request.form("grammar_subject_studied") & "','" & request.form("highschool_name") & "','" & h & "','" & request.form("highschool_graduate") & "','" & request.form("highschool_subject_studied") & "','" & request.form("College_name") & "','" & z & "','" & request.form("College_graduate") & "','" & request.form("College_subject_studied") & "','" & request.form("trade_name") & "','" & t & "','" & request.form("trade_graduate") & "','" & request.form("trade_subject_studied") & "')",cn,3,3
set rs=nothing
cn.close
'dim cn
set cn = CreateObject("ADODB.Connection")
' conn.open <connection string>
cn.Open MM_McKenna_STRING
'cn.open strSQL, dbConn ,adOpenKeyset, adLockOptimistic, adCmdText
dim a1,a2,a3,a4,a5,a6,b1,b2,b3,b4,b5,b6,c1,c2,c3,c4,c5,c6,d1,d2,d3,d4,d5,d6
a1=request.form("type1")
if a1 = "" then
a1 = 0
end if
a2=request.form("type2")
if a2 = "" then
a2 = 0
end if
a3=request.form("type3")
if a3 = "" then
a3 = 0
end if
a4=request.form("type4")
if a4 = "" then
a4 = 0
end if
a5=request.form("type5")
if a5 = "" then
a5 = 0
end if
a6=request.form("type6")
if a6 = "" then
a6 = 0
end if
b1=request.form("Org_or_state_issued1")
if b1 = "" then
b1 = 0
end if
b2=request.form("Org_or_state_issued2")
if b2 = "" then
b2 = 0
end if
b3=request.form("Org_or_state_issued3")
if b3 = "" then
b3 = 0
end if
b4=request.form("Org_or_state_issued4")
if b4 = "" then
b4 = 0
end if
b5=request.form("Org_or_state_issued5")
if b5 = "" then
b5 = 0
end if
b6=request.form("Org_or_state_issued6")
if b6 = "" then
b6 = 0
end if
c1=request.form("Initial_issue_date1")
if c1 = "" then
c1 = 0
end if
c2=request.form("Initial_issue_date2")
if c2 = "" then
c2 = 0
end if
c3=request.form("Initial_issue_date3")
if c3 = "" then
c3 = 0
end if
c4=request.form("Initial_issue_date4")
if c4 = "" then
c4 = 0
end if
c5=request.form("Initial_issue_date5")
if c5 = "" then
c5 = 0
end if
c6=request.form("Initial_issue_date6")
if c6 = "" then
c6 = 0
end if
d1=request.form("Exp_date1")
if d1 = "" then
d1 = 0
end if
d2=request.form("Exp_date2")
if d2 = "" then
d2 = 0
end if
d3=request.form("Exp_date3")
if d3 = "" then
d3 = 0
end if
d4=request.form("Exp_date4")
if d4 = "" then
d4 = 0
end if
d5=request.form("Exp_date5")
if d5 = "" then
d5 = 0
end if
d6=request.form("Exp_date6")
if d6 = "" then
d6 = 0
end if
apno = request.form("App_no")
response.Write apno
'rs.open "insert into License_detail values('" & request.querystring("ano") & "','" & a1 & "','" & a2 & "','" & a3 & "','" & a4 & "','" & a5 & "','" & a6 & "','" & b1 & "','" & b2 & "','" & b3 & "','" & b4 & "','" & b5 & "','" & b6 & "','" & c1 & "','" & c2 & "','" & c3 & "','" & c4 & "','" & c5 & "','" & c6 & "','" & d1 & "','" & d2 & "','" & d3 & "','" & d4 & "','" & d5 & "','" & d6 & "')",cn,3,3
'INSERT into tableName (field1, filed2) values (field1value, field2value)
'set conn = CreateObject("ADODB.Connection")
' conn.open <connection string>
' ...
' objConn.close
' set objConn = nothing
rs.open "Insert into License_detail(App_no,type1,type2,type3,type4,type5,type6,Org_or_state_issued1,Org_or_state_issued2, Org_or_state_issued3,Org_or_state_issued4,Org_or_state_issued5,Org_or_state_issued6,Intial_issue_dat e1,Initial_issue_date2,Initial_issue_date3,Initial_issue_date4,Initial_issue_date5,Initial_issue_dat e6,Exp_date1,Exp_date2,Exp_date3,Exp_date4,Exp_date5,Exp_date6) values (ano,a1,a2,a3,a4,a5,a6,b1,b2,b3,b4,b5,b6,c1,c2,c3,c4,c5,c6,d1,d2,d3,d4,d5,d6)"
'objcon.close
set rs=nothing
set rs = server.createobject("adodb.recordset")
Please if someone could help me figuring out what the problem is , as I cannot see one. Thankyou.
Microsoft VBScript runtime error '800a01a8'
Object required
/jobapplicationd.asp, line 207
My code with line 207 highlighted and red.
<%
dim apno
apno = Session("ano")
if Request("submit")= "Reset" then
'if Request("submit")= "Submit" then
response.redirect "jobapplicationd.asp?ano=" & request.querystring("ano")
end if
if Request.ServerVariables("REQUEST_METHOD") = "POST" then
'dim cn
set cn = server.createobject("adodb.connection")
cn.Open MM_McKenna_STRING
'cn.open
'dim rs
'set rs = server.createobject("adodb.recordset")
dim rs
set rs = server.createobject("adodb.recordset")
rs.open "select App_no from application_master",cn,3,3
if rs.recordcount = 0 then
dim cnt
cnt = 1
else
rs.movelast
cnt = rs("App_no") + 1
end if
set rs=nothing
set rs = server.createobject("adodb.recordset")
'dim apno
'apno=request.querystring("idd")
'dim cn
dim errormsg,xvalid,cdate,start_date,zip,phone,emergency_phone,salary_desired
cdate=request.form("cdate")
start_date=request.form("date_you_start")
zip=request.form("Zip")
phone=request.form("phone")
emergency_phone=request.form("emergency_phone")
salary_desired=request.form("salary_desired")
dim cn
set cn = server.createobject("adodb.connection")
cn.Open MM_McKenna_STRING
'cn.open
dim g,h,z,t
g=request.form("grammar_no_year")
if g = "" then
g = 0
end if
h=request.form("highschool_no_year")
if h = "" then
h = 0
end if
z=request.form("College_no_year")
if z = "" then
z = 0
end if
t=request.form("trade_no_year")
if t = "" then
t = 0
end if
'LastName=Request.Querystring("hf1")
'response.write cnt
rs.open "insert into application_master values ('" & request.form("Last_name") & "','" & request.form("First_name") & "','" & request.form("Middle_name") & "','" & request.form("Social_security_no") & "','" &request.form("cdate") & "','" & request.form("Present_address") & "','" & request.form("City") & "','" & request.form("State") & "','" & request.form("Zip") & "','" & request.form("Phone_number") & "','" & request.form("email_address") & "','" & request.form("Em_name") & "','" & request.form("Em_number") & "','" & request.form("Other_name") & "','" & request.form("Other_name_detail") & "','" & request.form("sixty_old") & "','" & request.form("Speak") & "','" & request.form("Read") & "','" & request.form("Write") & "','" & request.form("Nolo_contendre") & "','" & request.form("Convicted_crime") & "','" & request.form("crime_detail") & "','" & request.form("Probation") & "','" & request.form("Deferred_judication") & "','" & request.form("lawsuit-question") & "','" & request.form("Pretrial_diversion") & "','" & request.form("Ordered_supervision_crime") & "','" & request.form("Served_detail") & "','" & request.form("Professional_license") & "','" & request.form("Misconduct_authority") & "','" & request.form("Claim_pending_Mckenna") & "','" & request.form("position_full") & "','" & request.form("position_parttime") & "','" & request.form("position_pooltime") & "','" & request.form("position_applied_for") & "','" & request.form("date_you_start") & "','" & Request.form("salary_desired") & "','" & request.form("8_hour_shift") & "','" & request.form("10_hour_shift") & "','" & request.form("12_hour_shift") & "','" & request.form("Days") & "','" & Request.form("Evenings") & "','" & request.form("nights") & "','" & request.form("Weekends_only") & "','" & request.form("weekedays_only") & "','" & request.form("weekend_weekday") & "','" & request.form("currently_employed") & "','" & request.form("check_current_employer")& "','" &request.form("Check_no_detail") & "','" & request.form("applied_mckenna_before") & "','" & request.form("Employed_mckenna_before") & "','" & request.form("reason_leaving") & "','" & request.form("grammar_school_name") & "','" & g & "','" & request.form("grammar_graduate") & "','" & request.form("grammar_subject_studied") & "','" & request.form("highschool_name") & "','" & h & "','" & request.form("highschool_graduate") & "','" & request.form("highschool_subject_studied") & "','" & request.form("College_name") & "','" & z & "','" & request.form("College_graduate") & "','" & request.form("College_subject_studied") & "','" & request.form("trade_name") & "','" & t & "','" & request.form("trade_graduate") & "','" & request.form("trade_subject_studied") & "')",cn,3,3
set rs=nothing
cn.close
'dim cn
set cn = CreateObject("ADODB.Connection")
' conn.open <connection string>
cn.Open MM_McKenna_STRING
'cn.open strSQL, dbConn ,adOpenKeyset, adLockOptimistic, adCmdText
dim a1,a2,a3,a4,a5,a6,b1,b2,b3,b4,b5,b6,c1,c2,c3,c4,c5,c6,d1,d2,d3,d4,d5,d6
a1=request.form("type1")
if a1 = "" then
a1 = 0
end if
a2=request.form("type2")
if a2 = "" then
a2 = 0
end if
a3=request.form("type3")
if a3 = "" then
a3 = 0
end if
a4=request.form("type4")
if a4 = "" then
a4 = 0
end if
a5=request.form("type5")
if a5 = "" then
a5 = 0
end if
a6=request.form("type6")
if a6 = "" then
a6 = 0
end if
b1=request.form("Org_or_state_issued1")
if b1 = "" then
b1 = 0
end if
b2=request.form("Org_or_state_issued2")
if b2 = "" then
b2 = 0
end if
b3=request.form("Org_or_state_issued3")
if b3 = "" then
b3 = 0
end if
b4=request.form("Org_or_state_issued4")
if b4 = "" then
b4 = 0
end if
b5=request.form("Org_or_state_issued5")
if b5 = "" then
b5 = 0
end if
b6=request.form("Org_or_state_issued6")
if b6 = "" then
b6 = 0
end if
c1=request.form("Initial_issue_date1")
if c1 = "" then
c1 = 0
end if
c2=request.form("Initial_issue_date2")
if c2 = "" then
c2 = 0
end if
c3=request.form("Initial_issue_date3")
if c3 = "" then
c3 = 0
end if
c4=request.form("Initial_issue_date4")
if c4 = "" then
c4 = 0
end if
c5=request.form("Initial_issue_date5")
if c5 = "" then
c5 = 0
end if
c6=request.form("Initial_issue_date6")
if c6 = "" then
c6 = 0
end if
d1=request.form("Exp_date1")
if d1 = "" then
d1 = 0
end if
d2=request.form("Exp_date2")
if d2 = "" then
d2 = 0
end if
d3=request.form("Exp_date3")
if d3 = "" then
d3 = 0
end if
d4=request.form("Exp_date4")
if d4 = "" then
d4 = 0
end if
d5=request.form("Exp_date5")
if d5 = "" then
d5 = 0
end if
d6=request.form("Exp_date6")
if d6 = "" then
d6 = 0
end if
apno = request.form("App_no")
response.Write apno
'rs.open "insert into License_detail values('" & request.querystring("ano") & "','" & a1 & "','" & a2 & "','" & a3 & "','" & a4 & "','" & a5 & "','" & a6 & "','" & b1 & "','" & b2 & "','" & b3 & "','" & b4 & "','" & b5 & "','" & b6 & "','" & c1 & "','" & c2 & "','" & c3 & "','" & c4 & "','" & c5 & "','" & c6 & "','" & d1 & "','" & d2 & "','" & d3 & "','" & d4 & "','" & d5 & "','" & d6 & "')",cn,3,3
'INSERT into tableName (field1, filed2) values (field1value, field2value)
'set conn = CreateObject("ADODB.Connection")
' conn.open <connection string>
' ...
' objConn.close
' set objConn = nothing
rs.open "Insert into License_detail(App_no,type1,type2,type3,type4,type5,type6,Org_or_state_issued1,Org_or_state_issued2, Org_or_state_issued3,Org_or_state_issued4,Org_or_state_issued5,Org_or_state_issued6,Intial_issue_dat e1,Initial_issue_date2,Initial_issue_date3,Initial_issue_date4,Initial_issue_date5,Initial_issue_dat e6,Exp_date1,Exp_date2,Exp_date3,Exp_date4,Exp_date5,Exp_date6) values (ano,a1,a2,a3,a4,a5,a6,b1,b2,b3,b4,b5,b6,c1,c2,c3,c4,c5,c6,d1,d2,d3,d4,d5,d6)"
'objcon.close
set rs=nothing
set rs = server.createobject("adodb.recordset")
Please if someone could help me figuring out what the problem is , as I cannot see one. Thankyou.