Error Line 1: Incorrect syntax near !
HejsaJeg får følgende fejl:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Line 1: Incorrect syntax near ','.
/admin/frame/shownbetingelser.asp, line 27
Mit script ser sådan her ud:
<%
if request.form("show") = "0" then
Session("inputshow") = "1"
elseif request.form("show") = "1" then
Session("inputshow") = "0"
end if
Session("id") = request.form("id")
Dim strSql
Dim dbInsert_connection
set dbInsert_connection = Server.CreateObject("ADODB.Connection")
dbInsert_connection.Open Application("ConnectString")
if Request.Querystring("visside") = "VISSITE1" then
strSql = "Update VarerSQL set VISSITE1=" & Session("inputshow") & " WHERE id='" & Session("id") & "';"
elseif Request.Querystring("visside") = "VISSITE2" then
strSql = "Update VarerSQL set VISSITE2=" & Session("inputshow") & " WHERE id='" & Session("id") & "';"
elseif Request.Querystring("visside") = "VISSITE3" then
strSql = "Update VarerSQL set VISSITE3=" & Session("inputshow") & " WHERE id='" & Session("id") & "';"
elseif Request.Querystring("visside") = "VISSITE4" then
strSql = "Update VarerSQL set VISSITE4=" & Session("inputshow") & " WHERE id='" & Session("id") & "';"
elseif Request.Querystring("visside") = "VISSITE5" then
strSql = "Update VarerSQL set VISSITE5=" & Session("inputshow") & " WHERE id='" & Session("id") & "';"
end if
dbInsert_connection.execute(strSql)
dbInsert_connection.Close
set dbInsert_connection = Nothing
response.redirect "produktliste.asp"
%>
og det der bliver sendt til den ser sådan her ud :
<form action="shownonsite.asp?visside=VISSITE1" method="post" name="vissite1" id="vissite1">
<input type="hidden" name="id" id="id" value="<%= trim(rsprod("id")) %>">
<input type="hidden" name="show" id="show" value="<%= trim(rsprod("VISSITE1")) %>">
<td nowrap align="center" <%=bgcolor%>><% if trim(rsprod("VISSITE1")) = "0" then %><input type="image" value="submit" src="img/checked_checkbox.gif"><% elseif trim(rsprod("VISSITE1")) = "1" then %><input type="image" value="submit" src="img/unchecked_checkbox.gif"><% end if %></td>
</form>
<form action="shownonsite.asp?visside=VISSITE2" method="post" name="vissite2" id="vissite2">
<input type="hidden" name="id" id="id" value="<%= trim(rsprod("id")) %>">
<input type="hidden" name="show" id="show" value="<%= trim(rsprod("VISSITE2")) %>">
<td nowrap align="center" <%=bgcolor%>><% if trim(rsprod("VISSITE2")) = "0" then %><input type="image" value="submit" src="img/checked_checkbox.gif"><% elseif trim(rsprod("VISSITE2")) = "1" then %><input type="image" value="submit" src="img/unchecked_checkbox.gif"><% end if %></td>
</form>
<form action="shownonsite.asp?visside=VISSITE3" method="post" name="vissite3" id="vissite3">
<input type="hidden" name="id" id="id" value="<%= trim(rsprod("id")) %>">
<input type="hidden" name="show" id="show" value="<%= trim(rsprod("VISSITE3")) %>">
<td nowrap align="center" <%=bgcolor%>><% if trim(rsprod("VISSITE3")) = "0" then %><input type="image" value="submit" src="img/checked_checkbox.gif"><% elseif trim(rsprod("VISSITE3")) = "1" then %><input type="image" value="submit" src="img/unchecked_checkbox.gif"><% end if %></td>
</form>
<form action="shownonsite.asp?visside=VISSITE4" method="post" name="vissite4" id="vissite4">
<input type="hidden" name="id" id="id" value="<%= trim(rsprod("id")) %>">
<input type="hidden" name="show" id="show" value="<%= trim(rsprod("VISSITE4")) %>">
<td nowrap align="center" <%=bgcolor%>><% if trim(rsprod("VISSITE4")) = "0" then %><input type="image" value="submit" src="img/checked_checkbox.gif"><% elseif trim(rsprod("VISSITE4")) = "1" then %><input type="image" value="submit" src="img/unchecked_checkbox.gif"><% end if %></td>
</form>
<form action="shownonsite.asp?visside=VISSITE5" method="post" name="vissite5" id="vissite5">
<input type="hidden" name="id" id="id" value="<%= trim(rsprod("id")) %>">
<input type="hidden" name="show" id="show" value="<%= trim(rsprod("VISSITE5")) %>">
<td nowrap align="center" <%=bgcolor%>><% if trim(rsprod("VISSITE5")) = "0" then %><input type="image" value="submit" src="img/checked_checkbox.gif"><% elseif trim(rsprod("VISSITE5")) = "1" then %><input type="image" value="submit" src="img/unchecked_checkbox.gif"><% end if %></td>
</form>
Det underlige er at det er kun VISSITE1 som der er fejl ved, de andre virker fint!! Koden er krydstjekket, og er fuldstændig magen til hindanden!!
Er deren der kan hjælpe mig med dette underlige problem
Mvh
Stig :-)