Article Details
Id: | 18064 |
Product: | finPOWER Connect |
Type: | NEW |
Version: | 3.04.00 |
Opened: | 01/02/2021 |
Closed: | 13/04/2021 |
Released: | 30/06/2021 |
Job: | J025890 |
SQL Select Query Builder; added NOLOCK hint for SQL Server databases
The Select Query Builder object now includes a NOLOCK hint for SQL Server and SQL Azure databases.
WARNING: USE WITH EXTREME CAUTION.
Using the NOLOCK hint can return a dataset with the following issues:
- Rows may be included more than once
- Rows may be missing
- Row data may not committed, and later rolled back (meaning the wrong data has been returned)
- Cause various SQL errors
For these reasons the NO LOCK hint is not used if there is an active Database Transaction.
Sample script code is shown below.
' Create Select Query Builder
sqb = finBL.Database.CreateSelectQueryBuilder()
With sqb
.Table = "Account"
.TableHintNoLock = True
End With
The Quick Search functionality has been updated to utilise this new flag which MAY improve performance on SQL Server.