Please sign in to comment.
Fixed VARCHAR/LONGVARCHAR comparison bug.
As reported by Andy Hochhaus in the pyodbc group, SQL Server fails if you compare a SQL_LONGVARCHAR parameter with a varchar field. Had been using a hardcoded 255 to determine when to switch from VARCHAR to LONGVARCHAR. Now uses SQLGetTypeInfo to determine the maximum varchar and binary widths. This will also help performance for programs that bind a lot of strings greater than 255 but less than their db's max varchar size.
- Loading branch information...
Showing with 48 additions and 21 deletions.