Error with SQL query included in .asp page.

  • Thread starter Me_2005 via OfficeKB.com
  • Start date
M

Me_2005 via OfficeKB.com

Hi,
I am working with online recruiting website created using VBscript and SQL
database.
I am not sure why i m geeting this error.

Error Type:
Microsoft JET Database Engine (0x80004005)
Operation must use an updateable query.
/Webr/companyOV.asp, line 12

code looks like:

<%@ Language=VBScript %>
<HTML>
<HEAD>
<%
DIM MYSQL
MYSQL= "INSERT INTO Applicant(FirstName, LastName, Address1, Address2, City,
State, Province, Zip, HomePhone, BusinessPhone, Email, Educlevel,
OtherCertification, DesiredSalary, Company1, DateFrom1, DateTo1, JobTitle1,
Salary1, Duties1, Manager1, ContactNumber1, Company2, DateFrom2, DateTo2,
JobTitle2, Salary2, Duties2, Manager2, ContactNumber2, Company3, DateFrom3,
DateTo3, JobTitle3, Salary3, Duties3, Manager3, ContactNumber3, UnionPosition,
Race, Sex, RUFOP, Requisition, Resume)VALUES ('" & request.form("FirstName")
&"', '" & request.form("LastName") & "', '" & request.form("Address1") & "',
'" & request.form("Address2") & "', '" & request.form("City") & "', '" &
request.form("State") & "', '" & request.form("Province") & "', '" & request.
form("Zipcode") & "', '" & request.form("HomePhone") & "', '" & request.form
("BusinessPhone") & "', '" & request.form("Email") & "', '" & request.form
("Educlevel") & "', '" & request.Form("OtherCertification") & "', '" &
Request.Form("DesiredSalary") & "', '" & request.form("Company1") & "', '" &
request.form("From1") &"', '" & request.form("To1") &"', '" & request.form
("JobTitle1") &"', '" & request.form("Salary1") &"', '" & request.form
("Duties1") &"', '" & request.form("Manager1") &"', '" & request.form
("ContactNumber1") &"', '" & request.form("Company2") & "', '" & request.form
("From2") &"', '" & request.form("To2") &"', '" & request.form("JobTitle2")
&"', '" & request.form("Salary2") &"', '" & request.form("Duties2") &"', '" &
request.form("Manager2") &"', '" & request.form("ContactNumber2") &"', '" &
request.form("Company3") & "', '" & request.form("From3") &"', '" & request.
form("To3") &"', '" & request.form("JobTitle3") &"', '" & request.form
("Salary3") &"', '" & request.form("Duties3") &"', '" & request.form
("Manager3") &"', '" & request.form("ContactNumber3") &"', '"& request.form
("UnionPosition") &"', '"& request.form("Race") &"', '"& request.form("Sex")
&"', '" & request.Form("RUFOP") & "', '" & request.form("Requisition") & "',
'"& request.form("resume") &"')"

Set Con = Server.CreateObject("ADODB.Connection")
Con.Open "AccessDSN","sa",""
'Con.Open "Data Source=" & Server.Mappath("/careers/Web_Recruitment.mdb") &
";Provider=Microsoft.Jet.OLEDB.4.0;"
set Rs= con.Execute(MYSQL)
'Response.Write(MYSQL)
con.Close
Set con=Nothing
%>


Thanks for your help!
 
M

Me_2005 via OfficeKB.com

I just figured out what was wrong.!
Thanks!


Me_2005 said:
Hi,
I am working with online recruiting website created using VBscript and SQL
database.
I am not sure why i m geeting this error.

Error Type:
Microsoft JET Database Engine (0x80004005)
Operation must use an updateable query.
/Webr/companyOV.asp, line 12

code looks like:

<%@ Language=VBScript %>
<HTML>
<HEAD>
<%
DIM MYSQL
MYSQL= "INSERT INTO Applicant(FirstName, LastName, Address1, Address2, City,
State, Province, Zip, HomePhone, BusinessPhone, Email, Educlevel,
OtherCertification, DesiredSalary, Company1, DateFrom1, DateTo1, JobTitle1,
Salary1, Duties1, Manager1, ContactNumber1, Company2, DateFrom2, DateTo2,
JobTitle2, Salary2, Duties2, Manager2, ContactNumber2, Company3, DateFrom3,
DateTo3, JobTitle3, Salary3, Duties3, Manager3, ContactNumber3, UnionPosition,
Race, Sex, RUFOP, Requisition, Resume)VALUES ('" & request.form("FirstName")
&"', '" & request.form("LastName") & "', '" & request.form("Address1") & "',
'" & request.form("Address2") & "', '" & request.form("City") & "', '" &
request.form("State") & "', '" & request.form("Province") & "', '" & request.
form("Zipcode") & "', '" & request.form("HomePhone") & "', '" & request.form
("BusinessPhone") & "', '" & request.form("Email") & "', '" & request.form
("Educlevel") & "', '" & request.Form("OtherCertification") & "', '" &
Request.Form("DesiredSalary") & "', '" & request.form("Company1") & "', '" &
request.form("From1") &"', '" & request.form("To1") &"', '" & request.form
("JobTitle1") &"', '" & request.form("Salary1") &"', '" & request.form
("Duties1") &"', '" & request.form("Manager1") &"', '" & request.form
("ContactNumber1") &"', '" & request.form("Company2") & "', '" & request.form
("From2") &"', '" & request.form("To2") &"', '" & request.form("JobTitle2")
&"', '" & request.form("Salary2") &"', '" & request.form("Duties2") &"', '" &
request.form("Manager2") &"', '" & request.form("ContactNumber2") &"', '" &
request.form("Company3") & "', '" & request.form("From3") &"', '" & request.
form("To3") &"', '" & request.form("JobTitle3") &"', '" & request.form
("Salary3") &"', '" & request.form("Duties3") &"', '" & request.form
("Manager3") &"', '" & request.form("ContactNumber3") &"', '"& request.form
("UnionPosition") &"', '"& request.form("Race") &"', '"& request.form("Sex")
&"', '" & request.Form("RUFOP") & "', '" & request.form("Requisition") & "',
'"& request.form("resume") &"')"

Set Con = Server.CreateObject("ADODB.Connection")
Con.Open "AccessDSN","sa",""
'Con.Open "Data Source=" & Server.Mappath("/careers/Web_Recruitment.mdb") &
";Provider=Microsoft.Jet.OLEDB.4.0;"
set Rs= con.Execute(MYSQL)
'Response.Write(MYSQL)
con.Close
Set con=Nothing
%>

Thanks for your help!
 
Top