Subject RE: [IBO] Firebird 2.5 any known issues with "MAX" keyword
Author Svein Erling Tysvær
Hi Craig!

>The following SQL statement works in IB Expert against a FB 2.5 database, but results in
>an error when I try to use the statement through an IB Objects query (Ver 4.9.143)
>
>SELECT MAX(Transfer_PK) as MaxVal
>FROM Transfer

Such a statement normally works OK with IBO, there's nothing inherently wrong with it and your problem is elsewhere.

>The error is:
>
>ISC Error Code 335544569
>Dynamic SQL error
>SQL error code = @1
>Invalid expression in the @1(not contained in either an aggregate function or the GROUP BY clause)

The message within parenthesis seems to indicate that IBO tries to add another field to the query. Try setting KeyLinksAutoDefine to false and check whether you have something in KeyLinks, MasterLinks and similar (you may also set it ReadOnly, but I don't think that matters).

By the way, you seem to lack some file in your IBO installation. I normally get some sensible text rather than @1 (though I'm probably using an older IBO version myself).

HTH,
Set