AggregateFunction.Max problem

Posts   
 
    
Stevenn
User
Posts: 30
Joined: 26-Sep-2007
# Posted on: 01-Jun-2016 16:26:37   

Hi

I am trying to get the max on an int primary field, using the following statement: adapter.GetScalar(TheFields.PKId, AggregateFunction.Max) LLBLGen 4.2 Final. May 4th 2016.

The SQL that is generated contains: SELECT TOP(@p2) MAX(blah, blah) @p2 is an int with value 1. This works fine against SQL Express 2008, which i am using on my dev machine, however our current servers are running SQL Server 2000.

In my search for an answer i found this thread: https://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=4869

Given that i can't use the CE drivers anymore, all that needs to change is that the TOP(@p2) needs to lose the brackets: TOP @p2 MAX(blah blah), whihc appears to work against both 2000 and 2008. I assume this would require a change to the DQE, or is there something i can change?

Thanks

Steven

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 01-Jun-2016 17:31:03   

Have you set the DQE Compatibility mode?

Stevenn
User
Posts: 30
Joined: 26-Sep-2007
# Posted on: 02-Jun-2016 08:19:08   

Walaa wrote:

Have you set the DQE Compatibility mode?

Thanks Walaa. Setting <add key="SqlServerDQECompatibilityLevel" value="1" /> took care of it. I knew it would have been covered somehow.

I don't think i will ever fully understand everything that this app can do. confused