Article Details
| Id: | 10751 |
| Product: | finPOWER Connect |
| Type: | NEW |
| Version: | 1.06.06 |
| Opened: | 29/11/2012 |
| Closed: | 30/11/2012 |
| Released: | 29/01/2013 |
| Job: | J010838 |
Select Query Builder; SqlWhere.AppendRangeWithPk method updated to allow a 'NOT' range to be supplied
The ISSqlWhereBuilder business layer object has been updated to allow a 'NOT' range to be supplied to the .AppendRangeWithPk method.
The following example returns all Accounts where the Account's Account Type is not 'CC' or 'VL':
Dim dr As IDataReaderDim sqb As ISSelectQueryBuildersqb = finBL.Database.CreateSelectQueryBuilder()With sqb.Table = "Account".Fields.AddList("AccountId,Name")With .SqlWhere.AppendRangeWithPk("Account.AccountTypePk", "AccountType", "AccountTypeId", "Pk", "CC,VL", , True)End WithEnd WithIf sqb.ExecuteDataReader(dr) ThenDo While dr.Read()finBL.DebugPrint(String.Format("{0}: {1}", dr!AccountId, dr!Name))LoopfinBL.Database.DataReaderClose(dr)ElseMain = FalseEnd If
The 'True' parameter on the end of the .AppendRangeWithPk method indicates that this is a 'NOT' range.