ASP - AYUDA POR FAVOR NECESITO

 
Vista:

AYUDA POR FAVOR NECESITO

Publicado por Miguel (1 intervención) el 19/07/2008 02:25:53
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Pagina nueva 1</title>
<!-- Creacion de Funcion para buscar el dato a traves del Rut del Cliente -->
<script type="text/javascript">
function BuscarCliente()
{
rutc.value = obj.value;
var accion = "manclientes.asp?rutc="+rutc.value;
window.document.FrontPage_Form1.action = accion;
window.document.FrontPage_Form1.target="_self";
dato = self.document.FrontPage_Form1.submit()
<%
Dim bdd
Dim rs
Dim variable,varnombre
Dim SQL
Set bdd = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
Set bdd = Server.CreateObject("ADODB.Connection")
bdd.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("latino.mdb"))
SQL = "SELECT * FROM clientes WHERE rutcliente = " & dato & " "
Set rs = bdd.Execute(SQL)
varnombre = rs("razonsocial")
variable = rs("rutcliente")
%>
// Resulta que cuando es numerico pasa sin comillas y cuando es texto con comillas //
// Aqui asigno a los campos para qe se vean en el formulario
document.FrontPage_Form1.T1.value = <%= variable %>
document.FrontPage_Form1.nombrec.value = "<%= varnombre %>"
}
</script>
</head>
<body>
<form name= "FrontPage_Form1" method="POST" action="--WEBBOT-SELF--" onsubmit="return FrontPage_Form1_Validator(this)" >
      
<!--webbot bot="Validation" s-data-type="Integer" s-number-separators="." -->
<input type="text" name="rutc" size="20" onclick = "javascript:BuscarCliente(this.form)">
<input type="text" name="nombrec" >
<input type="text" name="T1" size="20"><br>
</p>
</form>
</body>
</html>

POR FAVOR AYUDA TENGO PROBLEMAS ESTOY TRATANDO DE HACER UN FORMULARIO QUE RECIBE UN DATO A TRAVES DE UNA TEXTBOX EL CUAL AL HACER UN CLICK VALLA A UN RUTINA QUE LO BUSQUE A TRAVES DE UNA SELECT Y DESPLIEGUE LOS DATOS EN EL MISMO FORMULARIO

EL PROBLEMA QUE AL EJECUTARLO ME SALE EL SIGUIENTE ERROR

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 'rutcliente ='.
/latinobeta/ManClientes.asp, línea 29
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:AYUDA POR FAVOR NECESITO

Publicado por weirdmix (210 intervenciones) el 21/07/2008 23:17:42
estas tratando de combinar codigo de servidor con codigo de cliente, cosa q no puedes hacer, si quieres mas ayuda echame un mail...
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar