
23/05/2003, 03:21
|
| | Fecha de Ingreso: mayo-2003
Mensajes: 866
Antigüedad: 22 años Puntos: 0 | |
He acortado el mensage, y solo he dejado los campos idcliente, nombre1, apellidos1, nif1 y domicilio 1
Tipo de error:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][Controlador ODBC Microsoft Access] Error de sintaxis (falta operador) en la expresión de consulta '145874874p',sanat cruz''.
/webirm/admin/editcliente.asp, line 44
Tipo de explorador:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Página:
POST 94 bytes to /webirm/admin/editcliente.asp
Datos de POST:
nombre1=juan&apellidos1=garcia&nif1=145874874p&dom icilio1=sanat+cruz&idproducto=&update=Update
Hora:
<%@ LANGUAGE = "VBScript" %>
<!-- #include file="../db.asp" -->
<!-- #include file="../config.asp" -->
<!-- #include file="../functions.asp" -->
<%
verify
idcliente=request.form("idcliente")
nombre1=request.form("nombre1")
apellidos1=request.form("apellidos1")
nif1=request.form("nif1")
domicilio1=request.form("domicilio1")
if nombre1="" or nombre1=null then
msg=msg & "<br>Necesitas introducir el nombre del cliente."
end if
if apellidos1="" or apellidos1=null then
msg=msg & "<br>Necesitas introducir el apellidos del cliente."
end if
if nif1="" or nif1=null then
msg=msg & "<br>Necesitas introducir el N.I.F del cliente."
end if
if domicilio1="" or domicilio1=null then
msg=msg & "<br>Necesitas introducir el domicilio del cliente."
end if
if msg="" then
'Comprobar si es una nueva inserccion o una modificacion
if idcliente=null or idcliente="" then
'Insertar
sql="insert into clientes (nombre1, apellidos1,nif1,domicilio1) values "
sql=sql & "('" & valid_sql(nombre1) & "','" & valid_sql(apellidos1) & "'," & valid_sql(nif1) & "'," & valid_sql(domicilio1) & ")"
response.write(sql)
db.execute(sql)
else
sql=" update clientes set nombre1='" & valid_sql(nombre1) & "', apellidos1='" & valid_sql(apellidos1) & "', nif1='" & valid_sql(nif1) & "', domicilio1='" & valid_sql(domicilio1) & "' where idcliente=" & valid_sql(idcliente)
response.write(sql)
db.execute(sql)
end if
end if
%>
<html>
<head>
<title><% =storename %> Administración</title>
</head>
<body bgcolor="<%=bgcolor %>" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" text="<%= text %>" alink="<%= COLdark %>" link="<%= COLdark %>" vlink="<%= COLdark %>">
<font face="<%= fontface %>" size="-2">
<center>
<br>
<table width=100% border=0>
<td width=100 valign=top>
<p>
<% adminmenu "prod" %>
</td>
<td valign=top>
<%= msg %>
<form action="editcliente.asp?stage=save" method=post>
<table cellspacing=0 cellpadding="0" border="0">
<tr>
<td align=right valign="center"><font face="helvetica" size="1" color="<%= COLdark %>">
nombre1: </font><BR></td>
<td align=left valign="top">
<font face="helvetica" size="1" color="<%= text %>">
<input size=20 name="nombre1" value="<%= nombre1 %>"<maxlength=100>
</td>
</tr>
<tr>
<td align=right valign="center"><font face="helvetica" size="1" color="<%= COLdark %>">
apellidos1: </font><BR></td>
<td align=left valign="top">
<font face="helvetica" size="1" color="<%= text %>">
<input size=20 name="apellidos1" value="<%= apellidos1 %>" <maxlength=100>
</td>
</tr>
<tr>
<td align=right valign="center"><font face="helvetica" size="1" color="<%= COLdark %>">
nif1: </font><BR></td>
<td align=left valign="top">
<font face="helvetica" size="1" color="<%= text %>">
<input size=20 name="nif1" value="<%= nif1 %>"<maxlength=100>
</td>
</tr>
<tr>
<td align=right valign="center"><font face="helvetica" size="1" color="<%= COLdark %>">
domicilio1: </font><BR></td>
<td align=left valign="top">
<font face="helvetica" size="1" color="<%= text %>">
<input size=20 name="domicilio1" value="<%= domicilio1 %>"<maxlength=100>
</td>
</tr>
<input type="hidden" value="<% =idcliente %>" name="idcliente">
<input type="submit" value="Update" name="update">
</form>
</td>
</table>
<br>
<% footer %>
</body>
</html> |