B
Brian Linden
I have a page that I need to serve ASAP, but I also have some stats to take
care of on the database side.
The execution of the stats should not effect the delivery of the page....
Is there anything wrong with doing something like this:
------------------------------------------------------------------------
Private Delegate Sub UpdateStats(ByVal param1 as integer)
Sub PageLoad(...)
Dim oUpdate As New UpdateStats(AddressOf UpdateTheStats)
oUpdate.BeginInvoke(param1, Nothing, Nothing)
'Finish the rest of the page
End Sub
Private Sub UpdateTheStats(ByVal param1 as integer)
Try
'Update the database
Catch ex as Exception
'Handle errors
End Try
End Sub
care of on the database side.
The execution of the stats should not effect the delivery of the page....
Is there anything wrong with doing something like this:
------------------------------------------------------------------------
Private Delegate Sub UpdateStats(ByVal param1 as integer)
Sub PageLoad(...)
Dim oUpdate As New UpdateStats(AddressOf UpdateTheStats)
oUpdate.BeginInvoke(param1, Nothing, Nothing)
'Finish the rest of the page
End Sub
Private Sub UpdateTheStats(ByVal param1 as integer)
Try
'Update the database
Catch ex as Exception
'Handle errors
End Try
End Sub