[freetds] Using dbwritetext against Ms-Sql
freddy77 at gmail.com
Fri May 25 10:39:50 EDT 2012
2012/5/25 James K. Lowden <jklowden at freetds.org>:
> On Fri, 25 May 2012 12:15:33 +0000
> Trygve Liland <Trygve.Liland at visma.no> wrote:
>> The problem is that we are getting
>> tds_put_string: "writetext bulk IMAGECOLTAB.IMAGECOL
>> 0x00000000000000000000000000000000 timestamp = 0x0000000000000000
>> with log" Invalid text, ntext, or image pointer value
>> Any idea on what we are doing wrong? I have checked code that we have
>> in another program where we used dblib against Ms-Sqlserver, and I
>> see more or less the same code.
> Those zeros are a problem, no doubt about it.
> Do the db-lib unit tests t0013.c and t0014.c work with your server?
> That would verify that dbwritetext() works with the TDS version you're
> The log doesn't record the value of the textptr returned by dbtxtptr.
> If the server is sending a NULL textptr, see if that changes using TDS
> 7.1. If not, if you're receiving a good textptr from the server, you
> need to find out why you're sending a NULL textptr.
Try also to downgrade to 7.0 protocol.
MS decided to not return textptr with data even they still support
TEXTPTR function on T-SQL, or better, they decide to always return an
invalid textptr! I don't remember if was with 7.1 or 7.2... I don't
really understand why...
More information about the FreeTDS