Microsoft VBScript runtime error '800a000d'
Type mismatch: '[string: "L15N"]'
/MES/luis/show.asp, line 54
eso que dice L15N significa Linea 15 Norte, solo que ese es el valor que necesito consltar, y me da ese error, muestro mi codigo de formulario y el que muestra los daots:
Código ASP:
y el reportador: que muestra:Ver original
<html> <head> <title>meteora uses</title> <script type="text/javascript" src="meteora/src/meteora.js"></script> <script type="text/javascript"> Meteora.uses('Meteora.Calendar'); Meteora.onStart( function () { new Calendar( 'calendar1', { format: '%Y-%m-%d %H:%i', minYear: 2005, maxYear: 2010, showHour: true, showMinute: true, showMeridiem: true, showSecond: true }); } ); Meteora.uses('Meteora.Calendar'); Meteora.onStart( function () { new Calendar( 'calendar2', { format: '%Y-%m-%d %H:%i', minYear: 2005, maxYear: 2010, showHour: true, showMinute: true, showMeridiem: true, showSecond: true }); } ); </script> </head> <body> <form action="show.asp" method="post"> Fecha inicio: <input type="text" name="calendar1" id="calendar1"/><br><br> Fecha fin: <input type="text" name="calendar2" id="calendar2"/><br> <% Dim conexion,registros SET conexion=Server.CreateObject("ADODB.Connection") conexion.Open"PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV01;UID=sa;PWD=messrv;DATABASE=WASP " SET registros=Server.CreateObject("ADODB.RecordSet") registros.open"SELECT linea FROM optimas",conexion response.write("<select name='linea'>") response.write("<option value=1>all</option>") do while not registros.eof response.write("<option value="®istros.fields("linea")&">"®istros.fields("linea")&"</option>") registros.movenext loop response.write("</select>") conexion.close %> <input type="submit" value="consultar"> </form> </body> </html>
Código ASP:
Ver original
<% Response.Buffer = False Server.ScriptTimeout = 1400 %> <html> <head> <title>Reporte WAS2</title> </head> <body> <style type="text/css"> table.sample { border-width: 1px; border-spacing: 2px; border-style: groove; border-color: green; border-collapse: collapse; background-color: rgb(255, 255, 240); } table.sample th { border-width: 1px; padding: 3px; border-style: inset; border-color: red; background-color: ; -moz-border-radius: 0px 0px 0px 0px; } table.sample td { border-width: 1px; padding: 3px; border-style: inset; border-color: red; background-color: ; -moz-border-radius: 0px 0px 0px 0px; } </style> <p align="center"><table border="1" CLASS="sample"></p> <tr> <td><b>Linea</b></td> <td><b>Peso</b></td> <td><b>Tubo</b></td> <td><b>Fecha</b></td> </tr> <% dim conexion,calendar1,calendar2,registros,linea calendar1=request.form("calendar1") calendar2=request.form("calendar2") linea=request.form("linea") response.write(linea) SET conexion=Server.CreateObject("ADODB.Connection") conexion.Open "PROVIDER=SQLOLEDB; DATA SOURCE=VALP-MESSRV01;UID=sa;PWD=messrv;DATABASE=wasp " SET registros=Server.CreateObject("ADODB.RecordSet") 'registros.open"SELECT peso,tubo from pesos where fecha between '"&calendar1&"' AND '"&calendar2&"'",conexion if linea=1 Then registros.open"SELECT p.peso,p.tubo,p.fecha, o.linea FROM pesos as p, optimas as o where o.codigo = p.codOptima AND p.fecha Between '"&calendar1&"' AND '"&calendar2&"'order by linea",conexion else registros.open"SELECT p.peso,p.tubo,p.fecha, o.linea FROM pesos as p, optimas as o where o.codigo = p.codOptima and o.linea = '"&linea&"' AND p.fecha Between '"&calendar1&"' AND '"&calendar2&"'",conexion end if do while not registros.eof response.write("<tr>") response.write("<td>"®istros.fields("linea")&"</td>") response.write("<td>"®istros.fields("peso")&"</td>") response.write("<td>"®istros.fields("tubo")&"</td>") response.write("<td>"®istros.fields("fecha")&"</td>") registros.movenext loop conexion.close 'SELECT p.peso,p.tubo,p.fecha, o.linea FROM pesos as p, optimas as o where o.codigo = p.codOptima and o.linea = 'L02N' AND p.fecha Between '2010-05-11 09:42:34.000' AND '2010-05-11 09:42:39.000' %> </tr> </table> </body> </html>