String data, length mismath on image datatype

Post found bugs and possible workarounds.
rsdavis9
United States of America
Posts: 3
Joined: 05 Dec 2019, 16:24
Location: USA

String data, length mismath on image datatype

Post by rsdavis9 » 06 Nov 2014, 19:10

I am using the odbc native client for sqlserver and when I update a image column I get the following error for data over 65536

[SQL Server Native Client 10.0]String data, length mismatch

I have the following setup:
td: td6.2 sp2
os: win7
sqlserver: 2008 r2 10.50.2500.0
Coonect string in sql.ini
remotedbname=ss800,DRIVER={SQL Server Native Client 10.0};Mars_Connection=yes;SERVER=rdavis1;DATABASE=ss800

I have attached a sql create script and a test app
You do not have the required permissions to view the files attached to this post.

rsdavis9
United States of America
Posts: 3
Joined: 05 Dec 2019, 16:24
Location: USA

Re: String data, length mismath on image datatype

Post by rsdavis9 » 06 Nov 2014, 19:15

a couple of notes:

on the {sql server} driver it doesn't produce errors but it seems to drop off about 60 bytes on a 2 mb file when read back in from the db.
nText seems to work fine with binary data and text on either driver.

Some instructions of how to use the app:

Basically run the sql script to create the table.
Then run the sample program.
The program will update and read a column of image and ntext.
The filename should be filled in with files of various sizes
The cvt dbcs should be checked if you want the file of utf8 converted to utf16.
If the input file is named "tmp32k" for example then the output file created will be named "tmp32k.0"

rsdavis9
United States of America
Posts: 3
Joined: 05 Dec 2019, 16:24
Location: USA

Re: String data, length mismath on image datatype

Post by rsdavis9 » 13 Nov 2014, 21:54

I noticed this issue with the {Sql Server} driver.
This bug I am reporting is with the {Sql Server Native Client}.

Return to “Bug Reports”

Who is online

Users browsing this forum: [Ccbot] and 2 guests