update qry to run on page load
I am looking to add an update qry to the asp page below, so that the update qry will run when page is refreshed.
the current code likes like
<%
Dim adoMyRecordset
Dim strSQL, strSQLWhere, strSQLSort, strSQLCount, intRecordCount, strSQLWhereUrgent
strSQL = "SELECT qryUpcomingCases.ClientID, qryUpcomingCases.CourtDateFull,qryUpcomingCases.Ca seID, qryUpcomingCases.CourtNameShort, qryUpcomingCases.CourtDate FROM qryUpcomingCases; "
Set adoMyRecordset = RsOpen(strSQL)
If Not adoMyRecordset.EOF Then
Do Until adoMyRecordset.EOF
Response.Write "<b><a STYLE='text-decoration:none' href='NS_Main.asp?CaseID=" & adoMyRecordset("CaseID") & "' target='Main'>" & _
"" & "*" & adoMyRecordset("CourtNameShort") & " " & (WeekdayName(Weekday(adoMyRecordset("CourtDateFull ")))) & "," & " " & adoMyRecordset("CourtDate") & "</a></samp><br>" & vbCrLf
adoMyRecordset.MoveNext
Loop
End If %>
-------------------------------------------------
I want to add this qry to execute upon page load
UPDATE Cases SET Cases.DispoSentDate = 12/1/4
WHERE ((([Cases].[DispoSentDate]) Is Null) And (([Cases].[CaseNotes])="prospective") And (([Cases].[Paid])<1) And ((DateDiff("d",[DateEntered],Date()))>15));
|