Bug in DOC in How do I ...

Posts   
 
    
Rosacek
User
Posts: 155
Joined: 18-Mar-2012
# Posted on: 24-Apr-2014 21:04:00   

LLBLGen Pro Help Best practises -> How do I -> How do I get the MAX(Order.ShippingDate - Order.OrderDate) value from a customer's orders ?

ADAPTER

' VB.NET

Dim adapter As New DataAccessAdapter()
Dim maxValue As Integer = CInt(adapter.GetScalar(OrderFieldIndex.OrderId, (OrderFields.ShippedDate - OrderFields.OrderDate), _
    AggregateFunction.Max, (OrderFields.CustomerId == _customerId)))

'instead of OrderFieldIndex.OrderId should be OrderFields.OrderId 'and instead of == should be just =

Dim maxValue As Integer = CInt(adapter.GetScalar(OrderFields.OrderId, (OrderFields.ShippedDate - OrderFields.OrderDate), _
    AggregateFunction.Max, (OrderFields.CustomerId = _customerId)))
daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 25-Apr-2014 07:43:00   

Hi Rosacek,

You are right, that should be changed in v4.1 LLBLGen Famework documentation. We will look into it.

Thanks for the feedback wink

David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 28-Apr-2014 10:16:37   

Fixed in next build.

Frans Bouma | Lead developer LLBLGen Pro