Reputation: 2190
I have three related questions:
What are the limits to the query string executed by a pyodbc cursor?
Are they server-specific?
Where is the governing standard, whatever it is, documented?
I have tested up to 50k characters successfully, although the question stands.
Upvotes: 0
Views: 4217
Reputation: 1017
You can make a call to SQLGetInfo() with infoType SQL_MAX_STATEMENT_LEN. This will provide you with the following information:
An SQLUINTEGER value specifying the maximum length (number of characters, including white space) of an SQL statement. If there is no maximum length or the length is unknown, this value is set to zero.
You can download the ODBC Help Guide for more details which is contained in the Microsoft Data Access SDK development kit; downloadable from here:
http://www.microsoft.com/en-us/download/details.aspx?id=21995
Upvotes: 2