Foros del Web » Programando para Internet » ASP Clásico »

Error '80040e14' al borrar

Estas en el tema de Error '80040e14' al borrar en el foro de ASP Clásico en Foros del Web. Tengo un sistema de postales hecho en ASP y tengo un serio problema. Las postales viejas las tengo que borrar para que la base de ...
  #1 (permalink)  
Antiguo 23/02/2005, 05:53
Avatar de leopardix
(Desactivado)
 
Fecha de Ingreso: diciembre-2003
Mensajes: 91
Antigüedad: 20 años, 6 meses
Puntos: 0
Error '80040e14' al borrar

Tengo un sistema de postales hecho en ASP y tengo un serio problema.
Las postales viejas las tengo que borrar para que la base de datos no sea muy pesada.

El problema es que al momento de borrar me aparece este error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][Controlador ODBC Microsoft Access] Error de sintaxis en la fecha en la expresión de consulta 'sent_date < #24-ene-2005#'.

Sabes a qué se puededeber. La linea del errro es la 77 y te pego las anteriores y las lineas del código en cuestión. ¿Falta alguna coma, espacio, cerrar algo?
El código (comentado) que da problemas con la fecha es:

<%
' If the action parameter set in the form is equal to flush, that means the user
' has clicked the Flush Cards button. Now we will confirm the request by showing
' how many cards will be deleted if they proceed
elseif Action = "flush" then

' Get the date limit for deleting the files
DaysLimit = request.Form("daylimit")

'Translate that to an actual date and get the count of files that will be deleted
limit_date = DateAdd("d", (DaysLimit * -1), now())
file_total = 0
file_count = 0
sLimitDate = MediumDate(limit_date)
Dim rsCnt
Set rsCnt = Server.CreateObject( "ADODB.Recordset" )
rsCnt.CursorType=adOpenStatic
rsCnt.Open "SELECT count(*) FROM sentcards WHERE sent_date < #" & sLimitDate & "#", Conn
if not (rsCnt.eof) then
file_count=rsCnt(0)
end if
rsCnt.Close
set rsCnt=nothing

Dim rsTtl
Set rsTtl = Server.CreateObject( "ADODB.Recordset" )
rsTtl.CursorType=adOpenStatic
rsTtl.Open "SELECT count(*) FROM sentcards", Conn
if not (rsTtl.eof) then
file_total=rsTtl(0)
end if
rsTtl.Close
set rsTtl=nothing

'file_count = GetDeleteCandidateCount(Server.MapPath("cards\"), limit_date)
'file_total = GetAllFilesCount(Server.MapPath("cards\"))

'Display the file count, and get a final confirmation

%>


La web es de postales cristianas y la puedes ver en http://www.1000christiancards.com

Gracias por tu ayuda.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 20:54.