Page 1 of 1

Broken packet, data length ... exceeds field length

Posted: Thu 06 Aug 2015 10:43
by alemio
Hi, I'm using Builder c++ 6 and UniDAC to connect to SQL Server.
To workaround the error reported in my previous post (SQL server and datetime2) I'm using now Provider=prDirect.

If I have many data in a TUniQuery (i.e. 1300 rows) I have this error

"Broken packet, data length 65280 exceeds field length 256"

If I use Provider = prNativeClient I don't have this error.

What should I do? Should I create a new connection (I wouldn't do that)?

Regards
Alessandro

Re: Broken packet, data length ... exceeds field length

Posted: Fri 07 Aug 2015 08:13
by azyk
Unfortunately, we couldn't reproduce the problem. Please provide the script for creating the table structure, on which the problem is reproduced.

Re: Broken packet, data length ... exceeds field length

Posted: Tue 11 Aug 2015 08:30
by alemio
Hi, I'm trying to understand the error.
I can reproduce the error also with 1 record.
The problem occurs if in the database I have a nvarchar (max) field and this filed is filled by an empty string '' (with NULL it works and also with space ' ')

Regards
Alessandro

Re: Broken packet, data length ... exceeds field length

Posted: Tue 15 Sep 2015 08:42
by azyk
We have fixed this problem. Download and install the latest UniDAC version from http://www.devart.com/unidac/download.html

Re: Broken packet, data length ... exceeds field length

Posted: Fri 23 Dec 2016 00:45
by gerham
With ASE ODBC v1.1.3 I also get

('HY000', '[HY000] [Devart][ODBC][Adaptive Server Enterprise]Broken packet, data length 6 exceeds field length -2 (0) (SQLFetch)')

Seems to be related to TEXT columns?

Is anybody else using the ASE ODBC drivers or am I alone here?

Re: Broken packet, data length ... exceeds field length

Posted: Tue 27 Dec 2016 11:34
by azyk
Please specify the driver version and the version of Python and PyODBC.