Open Profpatsch opened 7 years ago
Same error with Driver versions 11 and 13.1 (all three official Microsoft drivers on Windows).
This is the documented behavior for SQL Native Client. Columns must be retrieved in increasing ordinal order. This part of the documentation was the same for SQL Server 7, so SQL Native Client has not introduced new behavior here. Otherdrivers may support fetching columns in random order. Applications can determine the behavior of a driver by calling SQLGetInfo for SQL_GETDATA_EXTENSIONS and using the bitmas SQL_GD_ANY_ORDER. By enforcing sequential order, the ODBC driver avoids having to have an intermediate row buffer, so there is a gain in efficiency and memory utilization.
I assume HDBC doesn’t fetch them necessarily in increasing order?
Also note that these are 1-indexed. (from another thread)
I can create a connection without problem. I have at small test table
And when I try
Same error for
select name
andselect id,name
.StackOverflow has some ideas, but it doesn’t seem to fit this problem.