Unable to filter GetScalar

Posts   
 
    
Markiemac
User
Posts: 132
Joined: 25-Apr-2006
# Posted on: 12-Jun-2006 17:41:16   

Hi all,

I can return the number of rows in table Section via:

relCount = Cint(adapter.GetScalar(SectionFields.DivisionCode, AggregateFunction.Count))

When I try to apply a filter on DivisionCode, where aDivID contains a value, via:

Dim filter as New PredicateExpression()
filter.Add(SectionFields.DivisionCode = aDivID)
relCount = Cint(adapter.GetScalar(SectionFields.DivCode, null, AggregateFunction.Count, filter))

It declares that null is no longer supported and to use 'System.DBNull' instead. When I do that overload resolution fails.

I'm using the latest LLBLGen Pro, VB, VS2005 & Adapter and I only want to return the number of rows where DivisionCode = the value of aDivID. Can anyone see what I might be missing confused

Thanks

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 13-Jun-2006 07:44:38   

Shouldn't "null" be "Nothing" in VB?