Broken packet, data length ... exceeds field length

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
alemio
Posts: 12
Joined: Wed 20 May 2015 14:31

Broken packet, data length ... exceeds field length

Post by alemio » Thu 06 Aug 2015 10:43

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

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

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

Post by azyk » Fri 07 Aug 2015 08:13

Unfortunately, we couldn't reproduce the problem. Please provide the script for creating the table structure, on which the problem is reproduced.

alemio
Posts: 12
Joined: Wed 20 May 2015 14:31

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

Post by alemio » Tue 11 Aug 2015 08:30

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

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

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

Post by azyk » Tue 15 Sep 2015 08:42

We have fixed this problem. Download and install the latest UniDAC version from http://www.devart.com/unidac/download.html

gerham
Posts: 12
Joined: Thu 22 Sep 2016 23:58

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

Post by gerham » Fri 23 Dec 2016 00:45

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?

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

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

Post by azyk » Tue 27 Dec 2016 11:34

Please specify the driver version and the version of Python and PyODBC.

Post Reply