Ver Mensaje Individual
  #13 (permalink)  
Antiguo 29/08/2006, 10:42
catalina.parente
 
Fecha de Ingreso: agosto-2006
Mensajes: 1
Antigüedad: 18 años, 8 meses
Puntos: 0
Ayuda por favor

Hola a mi me sale el mismo error pero no con las soluciones que ustedes dan no ha podido hacer que funcione todavia, me ayudan por favor!!!!!!
Les pongo la linea que tiene el error.


El error:
Tipo de error:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][Controlador ODBC Microsoft Access] Pocos parámetros. Se esperaba 1.
/Aceites/molist.asp, línea 115


Mi codigo:
<html>

<head>
<title></title>
</head>

<BODY leftmargin="0">
<%
%>
<%
' BEGIN USER CONSTANTS
Dim CONN_STRING
Dim CONN_USER
Dim CONN_PASS
CONN_STRING = "DSN=Aceites;"
CONN_STRING = CONN_STRING & "Driver={Microsoft Access Driver (*.mdb)};"

CONN_USER = ""
CONN_PASS = ""

' BEGIN RUNTIME CODE
' Declare our vars
Dim iPageSize 'How big our pages are
Dim iPageCount 'The number of pages we get back
Dim iPageCurrent 'The page we want to show
Dim strOrderBy 'A fake parameter used to illustrate passing them
Dim strSQL 'SQL command to execute
Dim objPagingConn 'The ADODB connection object
Dim objPagingRS 'The ADODB recordset object
Dim iRecordsShown 'Loop controller for displaying just iPageSize records
Dim I 'Standard looping var
Dim myfecha

iPageSize = 24 ' You could easily allow users to change this


If Request.QueryString("page") = "" Then
iPageCurrent = 1
Else
iPageCurrent = CInt(Request.QueryString("page"))
End If

If Request.QueryString("order") = "" Then
strOrderBy = "codigo"
Else
strOrderBy = Request.QueryString("order")
End If
wer=""
If Request.Form("codigo") <>"" Then
codi = Request.Form("codigo")
Else
codi = Request.QueryString("tcodi")
End If
If Request.Form("field1") <>"" Then
field11 = Request.Form("field1")
Else
field11 = Request.QueryString("f1")
End If
If Request.Form("Ciudad") <>"" Then
emer = Request.Form("Ciudad")
Else
emer = Request.QueryString("temer")
End If
If Request.Form("field6") <>"" Then
field66 = Request.Form("field6")
Else
field66 = Request.QueryString("f6")
End If
If Request.Form("fechaini") <>"" Then
fini = Request.Form("fechaini")
Else
fini = Request.QueryString("tfini")
End If
If Request.Form("fechafin") <>"" Then
fin = Request.Form("fechafin")
Else
fin = Request.QueryString("tfin")
End If
If Request.Form("field7") <>"" Then
field77 = Request.Form("field7")
Else
field77 = Request.QueryString("f7")
End If
strSQL = "SELECT Analisis_resumido.Movil,Analisis_resumido.Cliente FROM Analisis_resumido"
strSQL= strSQL & " WHERE (Analisis_resumido.mantl<>" & cHR(39) & wer & Chr(39)
If field11="cod" then
strSQL= strSQL & " AND Analisis_resumido.Movil=" & cHR(39) & codi & Chr(39)
End If
If field66="eme" then
strSQL= strSQL & " AND Analisis_resumido.Cliente=" & cHR(39) & emer & Chr(39)
End If
strSQL= strSQL & ")"
If field77="fec" then
strSQL= strSQL & " AND (Analisis_resumido.Fecha_Analisis>" & ("#") & day(fini) & "/" & month(fini) & "/" & year(fini) & ("#")

strSQL= strSQL & " AND Analisis_resumido.Fecha_Analisis<" & ("#") & day(fin) & "/" & month(fin) & "/" & year(fin) & ("#")

strSQL= strSQL & ")"
End If
strSQL = strSQL + "ORDER BY " & strOrderBy & ";"



Set objPagingConn = Server.CreateObject("ADODB.Connection")
objPagingConn.Open CONN_STRING, CONN_USER, CONN_PASS

Set objPagingRS = Server.CreateObject("ADODB.Recordset")
objPagingRS.PageSize = iPageSize

objPagingRS.CacheSize = iPageSize

objPagingRS.Open strSQL, objPagingConn, adOpenStatic, adLockReadOnly, adCmdText ' La linea del error

' Get the count of the pages using the given page size
iPageCount = objPagingRS.PageCount

' If the request page falls outside the acceptable range,
' give them the closest match (1 or max)
If iPageCurrent > iPageCount Then iPageCurrent = iPageCount
If iPageCurrent < 1 Then iPageCurrent = 1

' Check page count to prevent bombing when zero results are returned!
%>
<%
If iPageCount = 0 Then
Response.Write "No hay registros. Revise los criterios de selección!"
Else
' Move to the selected page
objPagingRS.AbsolutePage = iPageCurrent

' Start output with a page x of n line
%>
<%=myfecha%>
<center><FONT SIZE="+1">Reporte Analisis de Aceites Pagina <B><%= iPageCurrent %></B> de <B><%= iPageCount %></B>
</FONT>
</center>
<% End If %>
<center>
<table border="1" bordercolor="#000000" style="font-family: Arial; font-size: 8 pt; font-weight: bold" bgcolor="#99C8EA">
<tr>
<td bgcolor="#99C8EA">Movil</td>
<td bgcolor="#99C8EA">Ciudad</td>

</tr>
<%
' ' Loop through our records and ouput 1 row per record
' iRecordsShown = 0
' Do While iRecordsShown < iPagesize And Not objPagingRS.EOF%>
<TR>
<TD ALIGN=LEFT BGCOLOR=white>
<%=objpagingRS("otnumero")%>

</td><TD ALIGN=LEFT BGCOLOR=white>

<a href="javascript:void(window.open('Wcodigo.asp?cod igo=<%=objpagingRS("Movil")%>','_blank','height=50 ,width=435'))">

<%=objpagingRS("Movil")%></a>
</TD></TR>
<%
iRecordsShown = iRecordsShown + 1
objPagingRS.MoveNext
' Loop %>
</table>
<%
' Show "previous" and "next" page links which pass the page to view
' and any parameters needed to rebuild the query. You could just as
' easily use a form but you'll need to change the lines that read
' the info back in at the top of the script.
If iPageCurrent <> 1 Then
%>
<INPUT TYPE=BUTTON VALUE="<%=imaxrecords%> |< "
ONCLICK="document.location.href='molist.asp?page=< %=1%>&order=<%= Server.URLEncode(strOrderBy) %>&tcodi=<%=codi%>&f1=<%=field11%>&temer=<%=emer%> &f6=<%=field66%>&f7=<%=field77%>&tfini=<%=fini%>&t fin=<%=fin%>'">


<INPUT TYPE=BUTTON VALUE="<%=imaxrecords%> << "
ONCLICK="document.location.href='molist.asp?page=< %=IPagecurrent-1%>&order=<%= Server.URLEncode(strOrderBy) %>&tcodi=<%=codi%>&f1=<%=field11%>&temer=<%=emer%> &f6=<%=field66%>&f7=<%=field77%>&tfini=<%=fini%>&t fin=<%=fin%>'">


<%
' Above spacing is inside the If so we don't get it unless needed
End If

If iPageCurrent < iPageCount Then
%>
<INPUT TYPE=BUTTON VALUE="<%=imaxrecords%> >> "
ONCLICK="document.location.href='molist.asp?page=< %=IPagecurrent+1%>&order=<%= Server.URLEncode(strOrderBy) %>&tcodi=<%=codi%>&f1=<%=field11%>&temer=<%=emer%> &f6=<%=field66%>&f7=<%=field77%>&tfini=<%=fini%>&t fin=<%=fin%>'">


<INPUT TYPE=BUTTON VALUE="<%=imaxrecords%> >| "
ONCLICK="document.location.href='molist.asp?page=< %=IPagecount%>&order=<%= Server.URLEncode(strOrderBy) %>&tcodi=<%=codi%>&f1=<%=field11%>&temer=<%=emer%> &f6=<%=field66%>&f7=<%=field77%>&tfini=<%=fini%>&t fin=<%=fin%>'">


<%
End If
%>
</center>
<%



' Close DB objects and free variables
objPagingRS.Close
Set objPagingRS = Nothing
objPagingConn.Close
Set objPagingConn = Nothing

' END RUNTIME CODE
%>
</XMP>
</BODY>
</html>