NEW1.06.06 · Released 29 January 2013
NEWfinPOWER Connect
Released in
1.06.06
29 January 2013
- Opened29 Nov 2012
- Closed30 Nov 2012
- Released29 Jan
Article 10751
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.