C
chug
How do I change this script to delete records after they are one year
old?
RSa.MoveNext
Loop
set fso = Nothing
RSa.Close
' Then, Delete old notifications
sql = "DELETE FROM residential WHERE enddate < #" &
DateAdd("d",-365,NOW()) & "#"
RSa.Open sql, "DSN=Auction"
sql = "DELETE FROM residential WHERE enddate < #" &
DateAdd("d",-365,NOW()) & "#"
RSa.Open sql, "DSN=Auction"
sql = "SELECT * FROM residential WHERE 1 = 1"
if Request("NewHomes") <> "" then
sql = sql & " AND NewHome = 1"
end if
if Request("Foreclosure") <> "" then
sql = sql & " AND Foreclosure = 1"
end if
sql = sql & " ORDER BY ViewingDate DESC"
On Error Resume Next
RS.Open sql, "DSN=Auction"
If err.number <> 0 Then
Response.Write err.description & "<br>"
Response.Write sql
Else%>
old?
RSa.MoveNext
Loop
set fso = Nothing
RSa.Close
' Then, Delete old notifications
sql = "DELETE FROM residential WHERE enddate < #" &
DateAdd("d",-365,NOW()) & "#"
RSa.Open sql, "DSN=Auction"
sql = "DELETE FROM residential WHERE enddate < #" &
DateAdd("d",-365,NOW()) & "#"
RSa.Open sql, "DSN=Auction"
sql = "SELECT * FROM residential WHERE 1 = 1"
if Request("NewHomes") <> "" then
sql = sql & " AND NewHome = 1"
end if
if Request("Foreclosure") <> "" then
sql = sql & " AND Foreclosure = 1"
end if
sql = sql & " ORDER BY ViewingDate DESC"
On Error Resume Next
RS.Open sql, "DSN=Auction"
If err.number <> 0 Then
Response.Write err.description & "<br>"
Response.Write sql
Else%>