AW: AW: AW: Re: AW: CLOB Problem with DBD::ODBC/DBD::ADO for SQL Server

AW: AW: AW: Re: AW: CLOB Problem with DBD::ODBC/DBD::ADO for SQL Server

am 30.01.2007 13:43:19 von alfred.mickautsch

> -----Ursprüngliche Nachricht-----
> Von: Martin Evans [mailto:martin.evans@easysoft.com]
> Gesendet: Dienstag, 30. Januar 2007 12:40
> An: dbi-users@perl.org
> Betreff: Re: AW: AW: Re: AW: CLOB Problem with DBD::ODBC/DBD::ADO for
> SQL Server
[...]
> I insert 24 chars (16 \ and 8 line feeds) and I get back 24 chrs.
>=20
> I am unsure why the code does not insert CR\LF as I am 100% sure the=20
> file itself contains CR\LF.
>=20
> I have tried with ntext, text and char fields - no difference.
>=20
> I have run it through a tds spy and can see the line feeds=20
> going through=20
> fine in both directions.
[...]

Yes, it is a weird problem. There seems to be a byte count limit under =
which this effect does not occur. It happens with my text example of =
102858 bytes. With a text of 569 bytes it does not seem to happen. It is =
very confusing.

Thank you for your efforts.

Servus -- Alfred


--
Alfred Mickautsch

Schuler Business Solutions AG
Karl-Berner-Str. 4
D-72285 Pfalzgrafenweiler
tel: +49 (0)74 45 830-184
fax: +49 (0)74 45 830-349
e-mail: alfred.mickautsch@schuler-ag.com

Re: CLOB Problem with DBD::ODBC/DBD::ADO for SQL Server

am 30.01.2007 15:53:45 von Martin.Evans

Mickautsch, Alfred wrote:
>> -----Ursprüngliche Nachricht-----
>> Von: Martin Evans [mailto:martin.evans@easysoft.com]
>> Gesendet: Dienstag, 30. Januar 2007 12:40
>> An: dbi-users@perl.org
>> Betreff: Re: AW: AW: Re: AW: CLOB Problem with DBD::ODBC/DBD::ADO for
>> SQL Server
> [...]
>> I insert 24 chars (16 \ and 8 line feeds) and I get back 24 chrs.
>>
>> I am unsure why the code does not insert CR\LF as I am 100% sure the
>> file itself contains CR\LF.
>>
>> I have tried with ntext, text and char fields - no difference.
>>
>> I have run it through a tds spy and can see the line feeds
>> going through
>> fine in both directions.
> [...]
>
> Yes, it is a weird problem. There seems to be a byte count limit under which this effect does not occur. It happens with my text example of 102858 bytes. With a text of 569 bytes it does not seem to happen. It is very confusing.
>
> Thank you for your efforts.
>
> Servus -- Alfred

As you indicate, the length has something to do with it. At 24000 chrs
it works and at 48000 chrs you lose each \ followed by a . It
is of no consolation to you but I have duplicated it with the MS SQL
Server driver and also demonstrated it works fine with our sql server
driver. There is a difference. The MS SQL Server driver execs sp_execute
to do the insert with the literal text whilst our driver calls
sp_execute with a parameter.

I had thought turning off translation might help but it doesn't.

I am of the opinion this may be a ms sql server odbc driver bug in which
your options are limited unless you have a support contract or can come
up with a workaround.

Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com