Color scheme: Light
You are here: start » en » Documentation » Data integration and data access » WKL OData ODBC Driver » Troubleshoot the OData ODBC driver » "Der Dienst hat das Ergebnis nach N Zeilen gekürzt" (The service truncated the result after N rows)

"Der Dienst hat das Ergebnis nach N Zeilen gekürzt" (The service truncated the result after N rows)

A pass-through query, or a query over linked tables that the driver passes through to the database, first shows rows and then stops. Access reports “ODBC–call failed”; the trace or another application shows SQLSTATE HY000 with the message “Der Dienst hat das Ergebnis nach N Zeilen gekuerzt (Zeilenobergrenze des Dienstes); es ist unvollstaendig.” (The service truncated the result after N rows (the service's row limit); it's incomplete.)

Environment

Driver version 0.7.0 or later, against a service with a row limit that it indicates in the response with "truncated": true, for example the data service Wkl.Data.Gateway (Gateway:Limits:MaxRows, by default 100,000 rows, configurable per object). Up to version 0.6.0, the driver returned the same truncated set without any message. A translated query isn't affected: the data service keeps its pages smaller than the row limit, and the driver reads on through next pages.

Cause

The statement returns more rows than the service allows in one response. The service sends the rows up to the limit and flags the response as truncated; the flag comes after the rows. The driver passes on the rows supplied and then reports the error, so that nobody continues working with an incomplete set that looks like the whole result. A passed-through statement has no next pages through which the rest could be fetched.

Resolution

  1. Narrow the statement so that it returns fewer rows: a condition, a grouping, or a page with ORDER BY … OFFSET … FETCH.
  2. If the application reads a single table, let the driver translate the query instead of passing it through: a translated query reads the result in pages (@odata.nextLink) instead of expecting it in a single response; see Supported SQL.
  3. If the application needs the whole result, have the service's operator raise the limit for this object or for custom statements.
en/wiki/data-conectivity/odata-odbc/troubleshooting/result-truncated.txt · Last modified: by Wolfgang van der Stille