Solved TD-3357: MS Sql-Server (ODBC) "TEXT"-Columns cutted

Post found bugs and possible workarounds.
Nils Jänicke
Germany
Posts: 423
Joined: 20 Sep 2017, 11:56
Location: Villingen-Schwenningen, Germany

TD-3357: MS Sql-Server (ODBC) "TEXT"-Columns cutted

Post by Nils Jänicke » 30 Oct 2007, 13:43

Hi,



we have problems with TD (all versions, tested with 1.51 PTF6, 3.1 PTF4 and 4.2) connecting a MS-SQLServer database (SqlServer 2005, but older versions too, and it seems there is the same problem in 5.1). Very long columns of the datatype "text" are corrupted if they are longer than 32k . In Sql.ini we tested longbuffer=131072 (and other values) in [odbcrtr]. Using the datatype "image" the string is not corrupted, but in TD 5.1 we should use "text" or "ntext" to preserve problems with unicode, so this is a great problem for us.

SalStrGetBufferLength shows the correct value of 100980, but SalStrLength shows 32766. Using the datatype "image" the whole string is getting correct.



o_o

Jean-Marc Gemperle

Re: TD-3357: MS Sql-Server (ODBC) "TEXT"-Columns cutted

Post by Jean-Marc Gemperle » 30 Oct 2007, 14:05

Hi Nils,



Yes I believe what you explain here is unfortunately a known issue, affecting not only TD 5.1



TD-3357

SQLODB32 native router against SQLServer, truncation at 32767 bytes when fetching a TEXT DATA TYPE column, this does not happen with OLEDB and also not with the IMAGE dataype and native router



Jean-Marc

Nils Jänicke
Germany
Posts: 423
Joined: 20 Sep 2017, 11:56
Location: Villingen-Schwenningen, Germany

Re: TD-3357: MS Sql-Server (ODBC) "TEXT"-Columns cutted

Post by Nils Jänicke » 30 Oct 2007, 14:12

Hi Jean-Marc,



Thank you for the very fast response.



jmgemperle wrote: this does not happen with OLEDB and also not with the IMAGE dataype and native router




native router for SqlServer? How does this work, which dll should I use and how to configure it in sql.ini? Which version of TD supports native routers? 4.2?



Nils

Jean-Marc Gemperle

Re: TD-3357: MS Sql-Server (ODBC) "TEXT"-Columns cutted

Post by Jean-Marc Gemperle » 30 Oct 2007, 14:54

Hi Niels,



Yes I entered that bug and NATIVE ROUTER is not that accurate to define our ODBC connectivity but SQLODB32.DLL is I believe considered to be a router.



Anyway though wordings are important there is no such things as direct native connectivity (or other means) to connect to SQLSERVER other than SQLODB32 or OLEDB (at the 16 bit time and old SQLSERVER there was ;-). OLEDB IMO is obviously the most "direct". The new "Sql Native Client" from MS can also introduce confusion, I was... AFAIK it is just another ODBC OR OLEDB provider for supporting extra features like XML and to separate it from the MSDAC.



So sorry Niles, the only options currently you have is OLEDB or worakround to split your longs as some customers currently do untill we fix that issue.



Jean-Marc

Jean-Marc Gemperle

Re: TD-3357: MS Sql-Server (ODBC) "TEXT"-Columns cutted

Post by Jean-Marc Gemperle » 15 Jan 2008, 22:22

Hi Niels

The bug I mentioned from your description is supposed to be fixed in the SP1...!!!


TD-3357 SQLServer ODBC and truncation of TEXT columns at 32767 characters
so I'm suprised you still get the issue, and I'm sure you use SP1....

Your original description is very close to that bug....the reason why I mentioned that bug... it shows repro case is really important... So I will check the repro case from that bug and let you know the results. If I confirmed it fixed with TD 5.1SP1 I will provide the repro case for you to check it...and tell us exactly what is the problem you have.

Sorry if there was a missunderstanding...

JM

Jean-Marc Gemperle

Re: TD-3357: MS Sql-Server (ODBC) "TEXT"-Columns cutted

Post by Jean-Marc Gemperle » 16 Jan 2008, 17:12

Hi Niels,

Confirming I have no problem with TD 5.1 SP1 b6199 to insert/fetch into a TEXT column data > 50KB. No truncation anymore... So either you are not using SP1 version, fix probalby in SQLODB32.DLL or the issue is different, if it is please modify testcase attached to show us the problem.

JM
You do not have the required permissions to view the files attached to this post.

Return to “Bug Reports”

Who is online

Users browsing this forum: [Ccbot] and 0 guests