Maximum query length

I hope this isn’t too trivial a question, but I couldn’t find the answer in Axapta doc. I have a query range being set dynamically on our SalesTable which blows up when the range gets too big. If salesIdFilter (below) gets too big I get an SQL error. this.query().dataSourceTable(tablenum(salestable)).findRange(fieldnum(SalesTable,SalesID)).value(salesIdFilter); I’m wondering if this is an Axapta error or an SQL error? Does anyone know if Axapta imposes a maximum query length? Thanks, -= Steven

Steven, As far as I remember, Axapta does have a maximum query length. I remember it from working with the Record Level Permission module from Circlecapital (prior to Record Level Security being introduced in Axapta 3.0). Back then I experimented with widening one or more EDT’s - with mixed success! One of the EDT’s was Range…I don’t remember if there were others and if so which ones. It’s a bit of a “thin” answer, but I hope it can help you to find a solution to your problem. Cheers, H. Jaeger Edenbrook Ltd

Hi Steven, I remember having a similar problem once, and it was due to not passing the special chars ( the single quote ') correctly. Otherwise, my range which was also considerable big, was working very well. You should analize the SQL syntax of the query that Axapta kernel is sending to SQL server (you should use the SQL Profiler) then try to run it independently in Query Analizer. This should give you some answers.

I am not sure, but I think its limit is about 2000 symbols I had a similar problem in the past. Solved it by using a separate table with values from the range and then using the EXIST JOIN clause on this table. It’s the best solutions, actually. Good luck