SQL Statament length validation

Hi,
Just wondering is there build in method for checking that SQL statament isn't to long.
with ODBC limit is 65k.
We produced on in statament with 85000 product ids -> so statament did overflow and application just hanged

Hi Mika,

No, there is no such method in TMS Aurelius. I personally never hit such limitation and was not aware that there were such limitations in SQL engines, but well, I never though an SQL such big would be something used in real environments!

It's easy. For example we get id's from products from other source and then send them to aurelius :D This was special when customer did minor price adjustment to all products. So yes -very possible.

We could add onSqlexecuting and validate it there.

You could also break the SQL into 2 or 3, by dividing the product ids into smaller groups, just to reduce the SQL size.

Or, you can use batch mechanism, which I think it's as fast as a single SQL - who knows, maybe faster, as the SQL is much simpler.

Yes, I fixed if by splitting it to smaller groups.
But for future - since I know that some one will forget it at same point-
EOMGMuchTooBigSQLException might save time when debugging

That should be an exception raised by the database driver (UniDac?) or even the ODBC layer. I wonder why they didn't refuse and raise an error like any other error?

Because otherwise we would have to know the limitations of all Delphi libraries, middle layers (ODBC, ADO, database client libs) and the database server themselves. Not sure if it's worth it.