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.
