Hi All,
I am trying to run an ASP script in deleting recods from database using with checkboxes and the following error message is seen:
-----------------------------------------------------------
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'FeatID=<FONT face=Arial><IMG onmouseup="FP_swapImg(0'.
/project/DeleteFeatures_verify.asp, line 88
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Page:
POST 1560 bytes to /project/DeleteFeatures_verify.asp
POST Data:
Delete=7&Delete=%3CFONT+face%3DArial%3E%3CIMG+onmouseup%3D%22FP_swapImg%280%2C0%2C%2F*id*%2F%27img1%27%2C%2F*url*%2F%27Delete_1A.jpg%27%29%22+onmousedown%3D%22FP_swapImg%281%2C0%2C%2F*id*%2F%27img1%27 . . .
-----------------------------------------------------------
The ASP script(DeleteFeatures_verify.asp) is as below:
<%
Dim connectDel, recstDel
Dim intSno, intDelSno, a, SQL
intSno=Request("Delete")
Set connectDel = Server.CreateObject("ADODB.Connection")
connectDel.Open("DRIVER={Microsoft Access Driver (*.mdb)};" _
& "DBQ=" & Server.MapPath("Estimation.mdb"))
a=split(intSno,",")
Dim iLoop
for iLoop=LBound(a) to UBound(a)
intDelSno=Trim(a(iLoop))
SQL = "Delete from FuncFeat where FeatID=" & intDelSno & ""
Set recstDel = connectDel.Execute(SQL)
'connectDel.Execute "Delete from FuncFeat where FeatID=" & intDelSno & ""
next
Response.Redirect "DeleteFeatures.asp"
connectDel.Close
Set recstDel = Nothing
Set connectDel=nothing
%>
-----------------------------------------------------------
The above ASP script(DeleteFeatures_verify.asp) is called when the DeleteFeatures.asp is executed.
The DeleteFeatures.asp is as below:
<form method="POST" action="DeleteFeatures_verify.asp" onSubmit="">
<p><!--[if gte vml 1]><v:line
id="_x0000_s1035" alt="" style='position:absolute;left:0;text-align:left;
top:0;flip:y;z-index:1' from="23.25pt,142.5pt" to="714pt,142.5pt"
strokecolor="#09f"/><![endif]--><![if !vml]><span style='mso-ignore:vglayout;
position:absolute;z-index:1;left:30px;top:189px;width:923px;height:2px'><img
width=923 height=2 src="DeleteFeatures59_files/image003.gif" v:shapes="_x0000_s1035"></span><![endif]></p>
<%
Dim connnectDel
Dim recstDel
Dim SQL
'Dim intCounter,intMod,rcolor
%>
<%
Set connectDel = Server.CreateObject("ADODB.Connection")
connectDel.Open("DRIVER={Microsoft Access Driver (*.mdb)};" _
& "DBQ=" & Server.MapPath("Estimation.mdb"))
Set recstDel = Server.CreateObject("ADODB.recordset")
recstDel.Open "SELECT FuncFeat.FeatID,FuncFeat.FeatName,FuncFeat.ProjID from FuncFeat order by FuncFeat.ProjID", connectDel
'SQL = "SELECT FuncFeat.FeatID, FuncFeat.FeatName, FuncFeat.ProjID from FuncFeat order by FuncFeat.ProjID"
'Set recstDel = connectDel.Execute(SQL)
%>
<p><!--[if gte vml 1]><v:line
id="_x0000_s1048" alt="" style='position:absolute;left:0;text-align:left;
top:0;flip:y;z-index:1' from="24pt,384.75pt" to="714.75pt,384.75pt"
strokecolor="#09f"/><![endif]--><![if !vml]><span style='mso-ignore:vglayout;
position:absolute;z-index:1;left:31px;top:512px;width:923px;height:2px'><img
width=923 height=2 src="DeleteFeatures59_files/image003.gif" v:shapes="_x0000_s1048"></span><![endif]></p>
<p><span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> </font></b></span></p>
<p><span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> </font></b></span></p>
<table width="674" border="1" cellpadding="0" cellspacing="0" height="43" style="border-collapse: collapse">
<tr>
<th align="left" bgcolor=#0099CC width="70" height="13" bordercolor="#000000" bordercolorlight="#006699" bordercolordark="#006699">
<b><font color="#000080" face="Arial">
<input type="checkbox" name="C1" value="ON" style="font-weight: 700"></font><font color="#000080" face="Arial">Check
</font> </b>
<th align="left" bgcolor=#0099CC width="290" height="13" bordercolor="#000000" bordercolorlight="#006699" bordercolordark="#006699">
<p align="center"><font face="Arial" size="2" color="#000080">
Functional </font><font color="#000080"><b>
<font SIZE="2" FACE="Arial">
Feature </font><font face="Arial"> </font></b></font><th align="left" bgcolor=#0099CC width="296" height="13" bordercolor="#000000" bordercolorlight="#006699" bordercolordark="#006699">
<p align="center"><font face="Arial" size="2" color="#000080">Project
ID</font></th>
</tr>
<%do until recstDel.EOF%>
<tr>
<td align="left" width="70" height="20">
<font SIZE="2" FACE="arial" COLOR="BLACK">
<width=35%>
<Input Type=CheckBox Name=Delete Value=<%=recstDel("FeatID")%>><td align="left" width="290" height="20">
<font SIZE="2" FACE="arial" COLOR="BLACK">
<%Response.Write (recstDel("FeatName"))%> </font>
<td align="center" width="296" height="20">
<font SIZE="2" FACE="arial" COLOR="BLACK">
<%Response.Write(recstDel("ProjID"))%> </font>
<%recstDel.MoveNext%>
</tr>
<%loop
Set recstDel=nothing
Set connectDel=nothing
%>
</table>
<div style="position: absolute; width: 128px; height: 26px; z-index: 2; left: 767px; top: 380px" id="Cancel">
</div>
<p>
<button name="Delete" type="submit" class="UserBackground" style="border-style:solid; border-width:0px; width: 135px; height: 26px; padding: 0" tabindex="15" value="Delete">
<font face="Arial">
<img border="0" id="img1" src="Delete_1C.jpg" height="25" width="125" alt="DELETE" fp-style="fp-btn: Embossed Rectangle 1; fp-font: Arial; fp-font-size: 12; fp-font-color-normal: #333399; fp-font-color-hover: #0000FF; fp-font-color-press: #333399" fp-title="DELETE" align="left" onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'Delete_1A.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'Delete_1C.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'Delete_1B.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'Delete_1A.jpg')"></font>
</button>
<button name="Clear" style="border-style:solid; border-width:0px; width: 135px; height: 26px" class="UserBackground" type="reset" tabindex="16">
<img border="0" id="img12" src="Clear_1C.jpg" height="25" width="125" alt="CLEAR" onmouseover="FP_swapImg(1,0,/*id*/'img12',/*url*/'Clear_1A.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img12',/*url*/'Clear_1C.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img12',/*url*/'Clear_1B.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img12',/*url*/'Clear_1A.jpg')" fp-style="fp-btn: Embossed Rectangle 1; fp-font: Arial; fp-font-size: 12; fp-font-color-normal: #333399; fp-font-color-hover: #0000FF; fp-font-color-press: #333399; fp-orig: 0" fp-title="CLEAR">
</button>
<font face="Arial">
<a href="Functional%20Features%20submenu.htm">
<img border="0" id="img4" src="Cancel_1C.jpg" height="25" width="125" alt="CANCEL" onmouseover="FP_swapImg(1,0,/*id*/'img4',/*url*/'Cancel_1A.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img4',/*url*/'Cancel_1C.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img4',/*url*/'Cancel_1B.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img4',/*url*/'Cancel_1A.jpg')" fp-style="fp-btn: Embossed Rectangle 1; fp-font: Arial; fp-font-size: 12; fp-font-color-normal: #333399; fp-font-color-hover: #0000FF; fp-font-color-press: #333399; fp-orig: 0" fp-title="CANCEL"></a></font></p>
<p> </p>
<div style="position: absolute; left: 426px; top: 565px; width: 157px; height: 247px; z-index: 13" id="Feat6_10">
<div style="position: absolute; width: 125px; height: 25px; z-index: 16; left: 24px; top: 195px" id="Feat10">
<span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> Feature 10</font></b></span><b><font face="Arial" color="#333399">:</font></b></div>
<div style="position: absolute; width: 125px; height: 25px; z-index: 17; left: 23px; top: 150px" id="Feat9">
<span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> Feature 9</font></b></span><b><font face="Arial" color="#333399">:</font></b></div>
<div style="position: absolute; width: 125px; height: 25px; z-index: 18; left: 23px; top: 107px" id="Feat8">
<span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> Feature 8</font></b></span><b><font face="Arial" color="#333399">:</font></b></div>
<div style="position: absolute; width: 125px; height: 25px; z-index: 19; left: 23px; top: 66px" id="Feat7">
<span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> Feature 7</font></b></span><b><font face="Arial" color="#333399">:</font></b></div>
<div style="position: absolute; width: 125px; height: 25px; z-index: 20; left: 23px; top: 21px" id="Feat6">
<span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> Feature 6</font></b></span><b><font face="Arial" color="#333399">:</font></b></div>
<p> </div>
<div style="position: absolute; left: -37px; top: 539px; width: 166px; height: 273px; z-index: 11" id="Feat1_5">
<div style="position: absolute; width: 125px; height: 25px; z-index: 13; left: 40px; top: 222px" id="Feat5">
<span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> Feature 5</font></b></span><b><font face="Arial" color="#333399">:</font></b></div>
<div style="position: absolute; width: 125px; height: 25px; z-index: 14; left: 41px; top: 176px" id="Feat4">
<span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> Feature 4</font></b></span><b><font face="Arial" color="#333399">:</font></b></div>
<div style="position: absolute; width: 125px; height: 25px; z-index: 15; left: 41px; top: 133px" id="Feat3">
<span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> Feature 3</font></b></span><b><font face="Arial" color="#333399">:</font></b></div>
<div style="position: absolute; width: 125px; height: 25px; z-index: 16; left: 41px; top: 91px" id="Feat2">
<span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> Feature 2</font></b></span><b><font face="Arial" color="#333399">:</font></b></div>
<div style="position: absolute; width: 125px; height: 25px; z-index: 17; left: 41px; top: 46px" id="Feat1">
<span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> Feature 1</font></b></span><b><font face="Arial" color="#333399">:</font></b></div>
<p> </div>
</form>
-----------------------------------------------------------
Thank you
Sorry for this long script.
I am trying to run an ASP script in deleting recods from database using with checkboxes and the following error message is seen:
-----------------------------------------------------------
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'FeatID=<FONT face=Arial><IMG onmouseup="FP_swapImg(0'.
/project/DeleteFeatures_verify.asp, line 88
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Page:
POST 1560 bytes to /project/DeleteFeatures_verify.asp
POST Data:
Delete=7&Delete=%3CFONT+face%3DArial%3E%3CIMG+onmouseup%3D%22FP_swapImg%280%2C0%2C%2F*id*%2F%27img1%27%2C%2F*url*%2F%27Delete_1A.jpg%27%29%22+onmousedown%3D%22FP_swapImg%281%2C0%2C%2F*id*%2F%27img1%27 . . .
-----------------------------------------------------------
The ASP script(DeleteFeatures_verify.asp) is as below:
<%
Dim connectDel, recstDel
Dim intSno, intDelSno, a, SQL
intSno=Request("Delete")
Set connectDel = Server.CreateObject("ADODB.Connection")
connectDel.Open("DRIVER={Microsoft Access Driver (*.mdb)};" _
& "DBQ=" & Server.MapPath("Estimation.mdb"))
a=split(intSno,",")
Dim iLoop
for iLoop=LBound(a) to UBound(a)
intDelSno=Trim(a(iLoop))
SQL = "Delete from FuncFeat where FeatID=" & intDelSno & ""
Set recstDel = connectDel.Execute(SQL)
'connectDel.Execute "Delete from FuncFeat where FeatID=" & intDelSno & ""
next
Response.Redirect "DeleteFeatures.asp"
connectDel.Close
Set recstDel = Nothing
Set connectDel=nothing
%>
-----------------------------------------------------------
The above ASP script(DeleteFeatures_verify.asp) is called when the DeleteFeatures.asp is executed.
The DeleteFeatures.asp is as below:
<form method="POST" action="DeleteFeatures_verify.asp" onSubmit="">
<p><!--[if gte vml 1]><v:line
id="_x0000_s1035" alt="" style='position:absolute;left:0;text-align:left;
top:0;flip:y;z-index:1' from="23.25pt,142.5pt" to="714pt,142.5pt"
strokecolor="#09f"/><![endif]--><![if !vml]><span style='mso-ignore:vglayout;
position:absolute;z-index:1;left:30px;top:189px;width:923px;height:2px'><img
width=923 height=2 src="DeleteFeatures59_files/image003.gif" v:shapes="_x0000_s1035"></span><![endif]></p>
<%
Dim connnectDel
Dim recstDel
Dim SQL
'Dim intCounter,intMod,rcolor
%>
<%
Set connectDel = Server.CreateObject("ADODB.Connection")
connectDel.Open("DRIVER={Microsoft Access Driver (*.mdb)};" _
& "DBQ=" & Server.MapPath("Estimation.mdb"))
Set recstDel = Server.CreateObject("ADODB.recordset")
recstDel.Open "SELECT FuncFeat.FeatID,FuncFeat.FeatName,FuncFeat.ProjID from FuncFeat order by FuncFeat.ProjID", connectDel
'SQL = "SELECT FuncFeat.FeatID, FuncFeat.FeatName, FuncFeat.ProjID from FuncFeat order by FuncFeat.ProjID"
'Set recstDel = connectDel.Execute(SQL)
%>
<p><!--[if gte vml 1]><v:line
id="_x0000_s1048" alt="" style='position:absolute;left:0;text-align:left;
top:0;flip:y;z-index:1' from="24pt,384.75pt" to="714.75pt,384.75pt"
strokecolor="#09f"/><![endif]--><![if !vml]><span style='mso-ignore:vglayout;
position:absolute;z-index:1;left:31px;top:512px;width:923px;height:2px'><img
width=923 height=2 src="DeleteFeatures59_files/image003.gif" v:shapes="_x0000_s1048"></span><![endif]></p>
<p><span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> </font></b></span></p>
<p><span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> </font></b></span></p>
<table width="674" border="1" cellpadding="0" cellspacing="0" height="43" style="border-collapse: collapse">
<tr>
<th align="left" bgcolor=#0099CC width="70" height="13" bordercolor="#000000" bordercolorlight="#006699" bordercolordark="#006699">
<b><font color="#000080" face="Arial">
<input type="checkbox" name="C1" value="ON" style="font-weight: 700"></font><font color="#000080" face="Arial">Check
</font> </b>
<th align="left" bgcolor=#0099CC width="290" height="13" bordercolor="#000000" bordercolorlight="#006699" bordercolordark="#006699">
<p align="center"><font face="Arial" size="2" color="#000080">
Functional </font><font color="#000080"><b>
<font SIZE="2" FACE="Arial">
Feature </font><font face="Arial"> </font></b></font><th align="left" bgcolor=#0099CC width="296" height="13" bordercolor="#000000" bordercolorlight="#006699" bordercolordark="#006699">
<p align="center"><font face="Arial" size="2" color="#000080">Project
ID</font></th>
</tr>
<%do until recstDel.EOF%>
<tr>
<td align="left" width="70" height="20">
<font SIZE="2" FACE="arial" COLOR="BLACK">
<width=35%>
<Input Type=CheckBox Name=Delete Value=<%=recstDel("FeatID")%>><td align="left" width="290" height="20">
<font SIZE="2" FACE="arial" COLOR="BLACK">
<%Response.Write (recstDel("FeatName"))%> </font>
<td align="center" width="296" height="20">
<font SIZE="2" FACE="arial" COLOR="BLACK">
<%Response.Write(recstDel("ProjID"))%> </font>
<%recstDel.MoveNext%>
</tr>
<%loop
Set recstDel=nothing
Set connectDel=nothing
%>
</table>
<div style="position: absolute; width: 128px; height: 26px; z-index: 2; left: 767px; top: 380px" id="Cancel">
</div>
<p>
<button name="Delete" type="submit" class="UserBackground" style="border-style:solid; border-width:0px; width: 135px; height: 26px; padding: 0" tabindex="15" value="Delete">
<font face="Arial">
<img border="0" id="img1" src="Delete_1C.jpg" height="25" width="125" alt="DELETE" fp-style="fp-btn: Embossed Rectangle 1; fp-font: Arial; fp-font-size: 12; fp-font-color-normal: #333399; fp-font-color-hover: #0000FF; fp-font-color-press: #333399" fp-title="DELETE" align="left" onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'Delete_1A.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'Delete_1C.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'Delete_1B.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'Delete_1A.jpg')"></font>
</button>
<button name="Clear" style="border-style:solid; border-width:0px; width: 135px; height: 26px" class="UserBackground" type="reset" tabindex="16">
<img border="0" id="img12" src="Clear_1C.jpg" height="25" width="125" alt="CLEAR" onmouseover="FP_swapImg(1,0,/*id*/'img12',/*url*/'Clear_1A.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img12',/*url*/'Clear_1C.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img12',/*url*/'Clear_1B.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img12',/*url*/'Clear_1A.jpg')" fp-style="fp-btn: Embossed Rectangle 1; fp-font: Arial; fp-font-size: 12; fp-font-color-normal: #333399; fp-font-color-hover: #0000FF; fp-font-color-press: #333399; fp-orig: 0" fp-title="CLEAR">
</button>
<font face="Arial">
<a href="Functional%20Features%20submenu.htm">
<img border="0" id="img4" src="Cancel_1C.jpg" height="25" width="125" alt="CANCEL" onmouseover="FP_swapImg(1,0,/*id*/'img4',/*url*/'Cancel_1A.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img4',/*url*/'Cancel_1C.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img4',/*url*/'Cancel_1B.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img4',/*url*/'Cancel_1A.jpg')" fp-style="fp-btn: Embossed Rectangle 1; fp-font: Arial; fp-font-size: 12; fp-font-color-normal: #333399; fp-font-color-hover: #0000FF; fp-font-color-press: #333399; fp-orig: 0" fp-title="CANCEL"></a></font></p>
<p> </p>
<div style="position: absolute; left: 426px; top: 565px; width: 157px; height: 247px; z-index: 13" id="Feat6_10">
<div style="position: absolute; width: 125px; height: 25px; z-index: 16; left: 24px; top: 195px" id="Feat10">
<span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> Feature 10</font></b></span><b><font face="Arial" color="#333399">:</font></b></div>
<div style="position: absolute; width: 125px; height: 25px; z-index: 17; left: 23px; top: 150px" id="Feat9">
<span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> Feature 9</font></b></span><b><font face="Arial" color="#333399">:</font></b></div>
<div style="position: absolute; width: 125px; height: 25px; z-index: 18; left: 23px; top: 107px" id="Feat8">
<span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> Feature 8</font></b></span><b><font face="Arial" color="#333399">:</font></b></div>
<div style="position: absolute; width: 125px; height: 25px; z-index: 19; left: 23px; top: 66px" id="Feat7">
<span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> Feature 7</font></b></span><b><font face="Arial" color="#333399">:</font></b></div>
<div style="position: absolute; width: 125px; height: 25px; z-index: 20; left: 23px; top: 21px" id="Feat6">
<span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> Feature 6</font></b></span><b><font face="Arial" color="#333399">:</font></b></div>
<p> </div>
<div style="position: absolute; left: -37px; top: 539px; width: 166px; height: 273px; z-index: 11" id="Feat1_5">
<div style="position: absolute; width: 125px; height: 25px; z-index: 13; left: 40px; top: 222px" id="Feat5">
<span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> Feature 5</font></b></span><b><font face="Arial" color="#333399">:</font></b></div>
<div style="position: absolute; width: 125px; height: 25px; z-index: 14; left: 41px; top: 176px" id="Feat4">
<span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> Feature 4</font></b></span><b><font face="Arial" color="#333399">:</font></b></div>
<div style="position: absolute; width: 125px; height: 25px; z-index: 15; left: 41px; top: 133px" id="Feat3">
<span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> Feature 3</font></b></span><b><font face="Arial" color="#333399">:</font></b></div>
<div style="position: absolute; width: 125px; height: 25px; z-index: 16; left: 41px; top: 91px" id="Feat2">
<span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> Feature 2</font></b></span><b><font face="Arial" color="#333399">:</font></b></div>
<div style="position: absolute; width: 125px; height: 25px; z-index: 17; left: 41px; top: 46px" id="Feat1">
<span style="vertical-align: middle"><b>
<font face="Arial" color="#333399"> Feature 1</font></b></span><b><font face="Arial" color="#333399">:</font></b></div>
<p> </div>
</form>
-----------------------------------------------------------
Thank you
Sorry for this long script.