tanrj / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
0 stars 0 forks source link

insert of long text fails silently #84

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Read a 400KB text document into a Python string
2. execute an SQL Insert statement that inserts the string into an SQL
Server text field
3. commit the transaction

What is the expected output? What do you see instead?
The string should be inserted into the text field. Instead, nothing is
inserted but no error is raised. Other values in the same Insert statement
are properly inserted and a new row is created.

What version of the product are you using? On what operating system?
Windows 7; pyodbc 2.1.6 for Python 2.6; SQL Server Express 2005

Please provide any additional information below.
The same test script works perfectly on a Windows 2003 server with SQL
Server 2005 (i.e., not the Express version) but fails with Windows 7 and
SQL Server Express 2005.

I have attached the document which I used for testing, the documentation
for PuTTY.

Smaller strings are inserted properly, but I do not know at what size of
string the issue appears.

Original issue reported on code.google.com by sc...@trevithick.ca on 12 Jan 2010 at 2:23

Attachments:

GoogleCodeExporter commented 8 years ago
What is the target data type?  Make sure you are not exceeding SQL Server's 
maximum size for varchar columns (8000).  If you are not already, use a 
VARCHAR(MAX) (SQL Server 2008+) or text.

Original comment by mkleehammer on 24 Aug 2010 at 4:16

GoogleCodeExporter commented 8 years ago
Fixed in 2.1.8.

Thanks.

Original comment by mkleehammer on 6 Sep 2010 at 6:00

GoogleCodeExporter commented 8 years ago

Original comment by mkleehammer on 21 Nov 2010 at 4:44