Hey guys
So I've got a split database where the accdb data file resides on a mapped network folder and the accde front end resides on every computer that needs to use the system.
There are currently 5 computers on the network that are on at the same time using the system.
A scenario is that the user wants to select all checkboxes.
Would it be cost effective in terms of performance speed and least amount of active connections to the database to:
a) Have a recordset clone and then loop through that setting each checkbox to true or -1
OR
b) Have a single line SQL command to set all checkboxes to true or -1 where a certain condition is true
Examples of each below:
a)
So I've got a split database where the accdb data file resides on a mapped network folder and the accde front end resides on every computer that needs to use the system.
There are currently 5 computers on the network that are on at the same time using the system.
A scenario is that the user wants to select all checkboxes.
Would it be cost effective in terms of performance speed and least amount of active connections to the database to:
a) Have a recordset clone and then loop through that setting each checkbox to true or -1
OR
b) Have a single line SQL command to set all checkboxes to true or -1 where a certain condition is true
Examples of each below:
a)
Code:
Dim Status As JobItemStatusEnum
Dim rsProducts As Recordset
Set rsProducts = Me.RecordsetClone
If rsProducts.RecordCount > 0 Then
If Not rsProducts.BOF Then rsProducts.MoveFirst
Do Until rsProducts.EOF
rsProducts.Edit
rsProducts![Job Items.Select] = -1
rsProducts.Update
rsProducts.MoveNext
Loop
rsProducts.MoveFirst
End If
rsProducts.Close
Set rsProducts = Nothing