Re: truncated data after INSERT with undef in DBI - bug?

From: iain (irhm_at_clara.net)
Date: 03/18/04


Date: Thu, 18 Mar 2004 11:35:01 -0000

Success! Brian pointed me in the right direction. trace shows no problem
with DBI. All your versions are lower than mine except for the SQL Server
ODBC driver (I had 2000.80.194.00 - from the original SQLsvr CD).

I've now installed SP3a on desktop, and got ODBC driver sqlsvr32.dll v
2000.081.9031.038. And my test program works OK. Your version still has a
higher number, but who cares?

There is a MS knowledge base article (814410) describing a memory leak
problem introduced with SQL Server SP3 & earlier ODBC drivers, fixed in
SP3a. I guess my problem is a similar cause.

thanks for your help,
Iain

"Brian McCauley" <nobull@mail.com> wrote in message
news:u9smg7i958.fsf@wcl-l.bham.ac.uk...
> "iain" <irhm@clara.net> writes:
>
> > With DBI and SQL Server ODBC driver I have prepared an INSERT statement
with
> > placeholders. But if the first execute has a undef (aka NULL), the
execute
> > for the following row is truncated to just the first character for the
same
> > field.
> >
> > Has anyone else found this, or got a workaround? Is it a problem with
DBI,
> > the DBD::ODBC driver or the SQL Server ODBC driver or SQL Server itself?
>
> I've run your test script here and not reproduced the problem with:
> perl5.8.0 (ActiveState 806).
> DBI 1.37
> DBD::ODBC 1.05
> SQL server ODBC driver 2000.81.9042.00
> odbc32.dll,odbccp32.dll 3.520.9042.0
> odbccr32.dll,odbccu32.dll 3.520.9030.0
> SQL server 8.00.534 (SP2)
>
> In addition to DBI tracing options mentioned by someone else you may
> also want to trace the SQL server using the SQL Profiler tool.
>
> I've experienced equally strnage problems on SQL servers lacking SP2.
>
> --
> \\ ( )
> . _\\__[oo
> .__/ \\ /\@
> . l___\\
> # ll l\\
> ###LL LL\\



Relevant Pages

  • Re: SQL Losing Data
    ... the other problem wasn't a SQL Server thing. ... And I would argue that it was an ODBC driver issue, solely, not even Access. ... sidebar shows a pencil, indicating that edits are being performed. ... I've tried using Profiler in the past and found it a bit unwieldy. ...
    (microsoft.public.sqlserver.odbc)
  • Re: SQL Server 2005 "Left outer join" return nothing through ODBC call
    ... Some outer joins suddenly returned empty resultsets on SqlServer 2005 in 2000-compatibility-mode, but only within our application. ... The same query executed in Query Analyzer just worked fine. ... We finally solved that issue by upgrading to the latest SqlServer ODBC driver which can be found at: ... It did work for SQL Server 7.0 and SQL server 2000. ...
    (microsoft.public.sqlserver.odbc)
  • Re: localized ODBC driver datetime issue
    ... which I use to connect to MS SQL Server 2003. ... SS> format, because this format does not correspond to the Russian date ... SS> was a way to know the language used by the ODBC driver, ...
    (microsoft.public.data.odbc)
  • Re: Which is the best provider for SQL Server 2000 and VB6
    ... OLEDB Provider for SQL Server is the best choice. ... Second - ADO does NOT work with ODBC driver directly and in a case if you ...
    (microsoft.public.data.ado)
  • Re: dts retrieves 0 rows when scheduled...
    ... Have you tried logging in as the SQLAgent service account and running the ... job/checking out the ODBC driver? ... > There is no error massage i can trace in sql server or in any of its logs, ... > the job just passes gracefully by the dts data transfare tasks, ...
    (microsoft.public.sqlserver.dts)