Ayuda con error en el código de página web al subirlo a un servidor en internet

Este código que te mando a mi me funciona en mi servidor, pero he subido el web a internet y me da este error: Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][Controlador ODBC Microsoft Access] Pocos parámetros. Se esperaba 2.
/elcae/todlib.asp, line 130
Mira a ver si puedes hecharme una mano xq esque yo ya estoy saturao.
<BODY vLink=#494965 aLink=#494965 link=#494965 leftMargin=0
topMargin=0 rightMargin=0 marginwidth="0" marginheight="0" color="#000000">
<%
dim tipo, nombre
tipo=request.querystring("tipo")
nombre=request.querystring("nombre")
%>
<center>
<script src="cab1.js">
</script>
<script>
cabecera('<a href="Default.htm">HOME</a>');
</script>
<SCRIPT language=JavaScript>
var now = new Date();
</SCRIPT>
<td valign=top>
<TABLE cellSpacing=0 cellPadding=0 width=645 border=0 align=left>
<TBODY>
<!--frame central-->
<TD vAlign=top width=645 bgColor=#ffffff >
<TABLE cellSpacing=0 cellPadding=0 width=645 12/05/03 border=0 height=22>
<TBODY>
<TR>
<TD vAlign=top width=500 bgColor=#c9d6f5 align=left><font face="Verdana" size="1" color="white"> <b><a href="default.asp">Homepage</a> / <a href=<%=tipo & ".asp" %>> Librerias <%=tipo %> </a> /  <font color="#0000a0"> <%=nombre %></font> </b></FONT> </TD>
<TD vAlign=top align=right bgColor=#c9d6f5><FONT face=Arial color=#ffffff
size=2>
<SCRIPT language=JavaScript>
document.write(Fecha());
</SCRIPT>
  </FONT></TD>
</TBODY></TABLE>
<!-- #INCLUDE File="ADOVBS.inc" -->
<%
' Nos conectamos a la base de datos
Set ob_con= Server.CreateObject("ADODB.Connection")
Set ob_comand=Server.CreateObject("ADODB.Command")
ob_con.Open "usuarios"
ob_comand.ActiveConnection = ob_con
ob_comand.CommandType = adCmdText
IF Request.QueryString("tipo") = "fabricantes" THEN
sql="SELECT Nombre, Fecha, Descripcion, Montaje FROM Librerias WHERE Fabricante= '" & nombre & "'"
ob_comand.CommandText = sql
SET ob_rs =ob_comand.Execute()
ELSE
IF Request.QueryString("tipo") = "control" THEN
sql="SELECT Nombre, Fecha, Descripcion, Fabricante, Montaje FROM Librerias WHERE Control='" & nombre & "'"
ob_comand.CommandText = sql
SET ob_rs =ob_comand.Execute()
ELSE
IF Request.QueryString("tipo")="potencia" THEN
sql="SELECT Nombre, Fecha, Descripcion, Fabricante, Montaje FROM Librerias WHERE Potencia='" & nombre & "'"
ob_comand.CommandText = sql
SET ob_rs =ob_comand.Execute()
ELSE
IF Request.QueryString("tipo")="data" THEN
sql="SELECT Nombre, Fecha, Descripcion, Fabricante FROM Librerias WHERE Data='" & nombre & "'"
ob_comand.CommandText = sql
SET ob_rs =ob_comand.Execute()
ELSE
IF Request.QueryString("tipo")="montaje" THEN
sql="SELECT Nombre, Fecha, Descripcion, Fabricante FROM Librerias WHERE Montaje='" & nombre & "'"
ob_comand.CommandText = sql
SET ob_rs =ob_comand.Execute()
END IF
END IF
END IF
END IF
END IF %>
<CENTER><BR><BR><BR>
<TABLE cellSpacing=0 cellPadding=0 width=602 border=0 height="137">
<TBODY>
<TR>
<TD vAlign=top align=left width="602" height="102" >
<center>
<table border="1" cellspacing="1" width="100%" bordercolor="#003049" bordercolorlight="#CDDEEA" bordercolordark="#003049" style="border-style: outset; border-color: #003049" >
<TR><% num_campos=ob_rs.Fields.Count
FOR Campo=0 TO num_campos -1
IF ob_rs(Campo).Name="Descripcion" THEN %>
<th width="30%" height="15" bgcolor="#ffffdd" style="text-align: center"><font face="AvantGarde Md BT" size="2"><%=ob_rs(Campo).Name %> </th>
<% ELSE
IF ob_rs(Campo).Name="Fecha" THEN %>
<th width="15%" height="15" bgcolor="#ffffdd" style="text-align: center"><font face="AvantGarde Md BT" size="2"><%=ob_rs(Campo).Name %> </th>
<% ELSE %>
<th width="18%" height="15" bgcolor="#ffffdd" style="text-align: center"><font face="AvantGarde Md BT" size="2"><%=ob_rs(Campo).Name %> </th>
<% END IF
END IF
NEXT
IF ob_rs.RecordCount <> 0 THEN
DO WHILE NOT ob_rs.EOF %>
<TR>
<%FOR Campo=0 TO num_campos -1 %>
<% IF Campo=0 THEN %>
<td height="46" bgcolor="#FFFFFF" style="text-align: center"><A HREF="L_Usreg.asp?nombre=<%=ob_rs(Campo) %>"><%=ob_rs(Campo) %></A> </TD>
<% ELSE %>
<td height="46" bgcolor="#FFFFFF" style="text-align: center"><%=ob_rs(Campo) %> </TD>
<%END IF
NEXT
ob_rs.MoveNext
LOOP
END IF%>
Y una pequeña consulta, ¿cómo puedo comprobar en un if si un checkboton esta marcado o no?
Muchas gracias !
Respuesta
1
Es que es Nombre as NAME, no hay otra forma a menos que lo hagas mal
Muchas gracias, era un problema que tenían en el servidor pero ahora que ya tienes el código ahí, que tengo que hacer para cambiar el nombre de los campos al realizar la consulta, me explico, yo quiero que en pantalla la tabla salga en ingles me habían dicho que se hacia así: Nombre as NAME pero así no me funciona, ¿sabes cómo puedo hacerlo? O tengo que hacer la tabla ahora en ingles también.
Muchas gracias anticipadas
Bueno indicame la linea porque es porque no me voy a poner a contarla, respecto a los check debes darles al value y luego hacer
If request.form("nombrecheck")=="true" then
true es el valor del value
el error lo da el ejecutar la select,
en: SET ob_rs =ob_comand.Execute()
Por favor si puedes miralo hoy.
Muchas gracias
Cambialo por:
IF Request.QueryString("tipo") = "fabricantes" THEN
sql="SELECT Nombre, Fecha, Descripcion, Montaje FROM Librerias WHERE Fabricante= '" & nombre & "'"
ELSE
IF Request.QueryString("tipo") = "control" THEN
sql="SELECT Nombre, Fecha, Descripcion, Fabricante, Montaje FROM Librerias WHERE Control='" & nombre & "'"
ELSE
IF Request.QueryString("tipo")="potencia" THEN
sql="SELECT Nombre, Fecha, Descripcion, Fabricante, Montaje FROM Librerias WHERE Potencia='" & nombre & "'"
ELSE
IF Request.QueryString("tipo")="data" THEN
sql="SELECT Nombre, Fecha, Descripcion, Fabricante FROM Librerias WHERE Data='" & nombre & "'"
ELSE
IF Request.QueryString("tipo")="montaje" THEN
sql="SELECT Nombre, Fecha, Descripcion, Fabricante FROM Librerias WHERE Montaje='" & nombre & "'"
END IF
END IF
END IF
END IF
ob_comand.CommandText = sql
SET ob_rs =ob_comand.Execute()

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas