What's the maximum length of a SQL query using JS or SOA

Posted by Rollbase User on 10-Sep-2010 21:43

What is the maximum allowable length of a SQL query for both Javascript API and SOAP API? I'm trying queries of different lengths, and the longer ones get this type of error: Fatal error: Uncaught SoapFault exception: [soapenv:Server.generalException] SQL query is too long in ........ If I knew the MAX length of a query, I can separate it into multiple smaller queries if it reached that size. Thanks, Mike

All Replies

Posted by Admin on 11-Sep-2010 11:05

Query cannot be longer than 5000 chars. Why do you need that long query? You should be able to use * for fields list.

Posted by Admin on 11-Sep-2010 18:12

The reason I need such a long query is because we integrated a GIS map with Rollbase. The users can select multiple properties on the map and click a button to retrieve information about the selected properties. The property information is stored in Rollbase. If they select many (250+) properties, the length of the query becomes too long.

If they select only 3 properties the query is something like:

SELECT address, owner, tax, block, lot FROM property_data WHERE propid IN ( '1810-002010000-000100000-00000', '1810-002010000-000040000-00000', '1810-002020000-000200000-QFARM')

But selecting many properties will be an issue. I am probably going to use a smaller property identifier (propid) to shorten the query.

Thanks

Posted by Admin on 11-Sep-2010 22:36

Well, looks cool, but 5000 chars query is not going to be efficient anyway. I think you should limit number of properties somehow.

This thread is closed