Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][Controlador ODBC Microsoft Access] Error de sintaxis en la cadena en la expresión de consulta ''5,)'.
/videoclub/newparte.asp, line 26
• Tipo de explorador:
Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
• Página:
POST 6 bytes to /videoclub/newparte.asp
• Datos de POST:
cojo=5
Newparte.asp
<%@ LANGUAGE = "VBScript" %>
<!-- #include file="db.asp" -->
<!-- #include file="configuracion.asp" -->
<!-- #include file="fxvideoclub.asp" -->
<%
estado=request.querystring("estado")
ediciontotal=false
if estado="save" then
cojo=request.form("cojo")
if cojo=null or not(isnumeric(cojo)) then
mensage=mensage & "<br>Necesitas introducir cojo."
end if
if mensage="" then
'insertar
sql="insert into partes (cojo"
if valid_sql(imagen)<>"" then
sql=sql & ",imagen"
SQLimagen=",'" & valid_sql(imagen) & "'"
end if
if valid_sql(notas)<>"" then
sql=sql & ",notas"
SQLnotas=",'" & valid_sql(notas) & "'"
end if
sql=sql & ") values ('" & valid_sql(cojo) & "," & SQLimagen & SQLnotas & ")"
db.execute(sql)
editcomplete=true
end if
end if
%>
<html>
<head>
<title>
</title>
<table>
<%
if not(idparte=null and idparte="" and not(isnumeric(idparte))) then
%>
<% end if %>
<p>
<td>
<% if ediciontotal then %>
<%= editarmensage %>
<% else %>
<form name="formulario" action="newparte.asp?estado=save&idparte=<%= idparte %>" method=post>
<%=mensage %>
<B>Cojo</B>
<input size=10 name="cojo" value="<%= cojo %>" maxlength=100>
<input type=submit>
</form>
<% end if %>
</body>
</html>
<%
db.close
set db=nothing
%>
Estos son los archivos incluidos
Db.asp
<!-- #include file="adovbs.inc" -->
<%
dim db
dim strConn
strConn = "vidconn"
Set db = Server.CreateObject("ADODB.Connection")
db.open strConn
%>
Fxvideoclub.asp
<%
Function valid_sql(s)
For i = 1 To Len(s)
If Mid(s, i, 1) = "'" Then
temp = temp + "'"
End If
temp = temp + Mid(s, i, 1)
Next
valid_sql=trim(temp)
End Function
%>
Hay un post que habla de fxvideoclub.asp en:
http://www.forosdelweb.com/showthrea...hlight=funcion
