Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Varchar values longer than 1024 chars are truncated #71

Open
AndrewJanuary opened this issue Mar 15, 2018 · 0 comments
Open

Varchar values longer than 1024 chars are truncated #71

AndrewJanuary opened this issue Mar 15, 2018 · 0 comments

Comments

@AndrewJanuary
Copy link

AndrewJanuary commented Mar 15, 2018

This seems to be a problem for both SQL_WVARCHAR & SQL_VARCHAR types. Any values larger than 1024 chars are truncated.

Reproduction Steps

  1. Execute a SQL query which will return a value greater than 1024 chars in length from a variable length column (e.g. SQL nvarchar(max)).

Reproducible with the following

Python/Pypyodbc versions
Python v3.5.2
Pypyodbc v1.3.4.3

ODBC Drivers Tested (64-bit):

Name Version File Driver Date
ODBC Driver 13 for SQL Server 2017.140.800.90 MSODBCSQL13.DLL 11/07/2017
SQL Server Native Client 11.0 2011.110.6540.00 SQLNCLI11.DLL 24/06/2016
SQL Server Native Client 10.0 2009.100.1600.01 SQLNCLI10.DLL 03/04/2010

Workaround

It is possible to resolve this by following the workaround detailed in the issues below (originally raised on Google code repo).

#62
https://code.google.com/archive/p/pypyodbc/issues/44
https://github.com/bpla2112/pypyodbc/issues/44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant