Skip Menu |
 

This queue is for tickets about the DBD-ODBC CPAN distribution.

Report information
The Basics
Id: 43539
Status: resolved
Priority: 0/
Queue: DBD-ODBC

People
Owner: Nobody in particular
Requestors: William.Flynn [...] ftc.usda.gov
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.18_4



X-Nai-Spam-Rules: 4 Rules triggered BAD_HDR_SEQ=1, SUBJ_HAS_UNIQ_ID_W_BAD_HDR_SEQ=1, SUBJ_HAS_UNIQ_ID=0.7, RV3216=0
X-Originalarrivaltime: 23 Feb 2009 15:49:32.0488 (UTC) FILETIME=[51CBC480:01C995CE]
MIME-Version: 1.0
X-Spam-Status: No, hits=-4.0 required=8.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED
Content-Class: urn:content-classes:message
X-Nai-Spam-Score: 2.7
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
Message-ID: <C416E6AF07AFC24A9EDD2BAB5D49FFD301817D60 [...] cofortcol2s309.agwest.one.usda.gov>
Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C995CE.446C6D71"
X-MS-Tnef-Correlator:
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 9D1C663C029 for <bug-DBD-ODBC [...] rt.cpan.org>; Mon, 23 Feb 2009 10:50:08 -0500 (EST)
Received: (qmail 10565 invoked by uid 103); 23 Feb 2009 15:50:07 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 23 Feb 2009 15:50:07 -0000
Received: from ftc-mail-edge1.fsc.usda.gov (HELO ftc-mail-edge1.fsc.usda.gov) (199.141.13.70) by 16.mx.develooper.com (qpsmtpd/0.43rc1) with ESMTP; Mon, 23 Feb 2009 07:50:00 -0800
Received: from (unknown [199.141.13.70]) by DA32USCOFC1_AVS01.usda.gov with smtp id 455b_9e07fdfa_01c1_11de_9c16_001143d22fdf; Mon, 23 Feb 2009 15:49:59 +0000
Received: from (unknown [199.141.13.70]) by FTC-MAIL-AV1.FSC.USDA.GOV with smtp id 4959_9e0b944c_01c1_11de_a8e5_001143d33bf3; Mon, 23 Feb 2009 08:49:56 -0700
Received: from mokansascis300.agcentral.one.usda.gov ([165.221.20.100]) by ftc-mail-edge1.fsc.usda.gov (8.13.8/8.13.8) with ESMTP id n1NFnaOL030166 for <bug-DBD-ODBC [...] rt.cpan.org>; Mon, 23 Feb 2009 08:49:50 -0700
Received: from cofortcol2s309.agwest.one.usda.gov ([199.141.13.209]) by mokansascis300.agcentral.one.usda.gov with Microsoft SMTPSVC(6.0.3790.3959); Mon, 23 Feb 2009 09:49:32 -0600
Delivered-To: cpan-bug+DBD-ODBC [...] diesel.bestpractical.com
Subject: Additional info for #43451
Return-Path: <William.Flynn [...] ftc.usda.gov>
Thread-Index: AcmVzkQ3W3beeiYXS/CQ1silxUypww==
X-Original-To: bug-DBD-ODBC [...] rt.cpan.org
X-Spam-Check-BY: 16.mx.develooper.com
X-Nai-Spam-Level: **
Date: Mon, 23 Feb 2009 08:49:09 -0700
X-Spam-Level: *
X-MS-Has-Attach:
Thread-Topic: Additional info for #43451
X-Mimeole: Produced By Microsoft Exchange V6.5
To: <bug-DBD-ODBC [...] rt.cpan.org>
From: "Flynn, William - Fort Collins, CO" <William.Flynn [...] ftc.usda.gov>
Content-Length: 0
content-type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: US-ASCII
Content-Length: 2187
Download (untitled) / with headers
text/plain 2.1k
Last week I reported this problem: Inserting more than 8,000 characters into SQL Server varchar(max) field gives "Invalid precision value" error It was assigned #43451. I was able to further characterize this problem and have additional information and sample code that should help with troubleshooting. There are two variables involved: Parameter value length: <= 8,000 bytes or > 8,000 bytes Parameter value binding: Yes or No <= 8,000 chars > 8,000 chars No binding Works Works Binding Works Fails To reproduce the problem create a SQL Server database named MyDB with a single table named MyTable with a single column named BigData of type varchar(max). Execute this Perl code: use DBI; my $eightThousandChars .= '12345678901234567890123456789012345678901234567890123456789012345678901 234567890'x(100); my $eightThousandAndOneChars = $eightThousandChars . "1"; my $dbh = DBI->connect("DBI:ODBC:Driver={SQL Native Client};Server=localhost;Database=MyDB;Trusted_Connection=yes;"); # Insert 8,000 characters into a varchar(max) without parameter value binding. # This works. my $qry = "insert into MyTable values ('$eightThousandChars')"; my $insh = $dbh->prepare($qry); my $rowcount = $insh->execute(); # Insert 8,001 characters into a varchar(max) without parameter value binding. # This works. $qry = "insert into MyTable values ('$eightThousandAndOneChars')"; $insh = $dbh->prepare($qry); $rowcount = $insh->execute(); # Insert 8,000 characters into a varchar(max) with parmeter value binding. # This works. my @data = ($eightThousandChars); $qry = "insert into MyTable values (?)"; $insh = $dbh->prepare($qry); $rowcount = $insh->execute(@data); # Insert 8,001 characters into a varchar(max) with parameter value binding. # This fails with: Invalid precision value (SQL-HY104) @data = ($eightThousandAndOneChars); $qry = "insert into MyTable values (?)"; $insh = $dbh->prepare($qry); $rowcount = $insh->execute(@data); The very last execute will fail. Bill... Bill Flynn (Vistronix Contractor) Senior Programmer (.NET, C#) USDA NRCS ITC 2150 Centre Ave., Building A, Suite 231 Fort Collins, CO 80526-8121 (970) 295-5613 (voice) william.flynn@ftc.usda.gov
content-type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: US-ASCII
Content-Length: 10747
Download (untitled) / with headers
text/html 10.4k
MIME-Version: 1.0
In-Reply-To: <C416E6AF07AFC24A9EDD2BAB5D49FFD301817D60 [...] cofortcol2s309.agwest.one.usda.gov>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
References: <C416E6AF07AFC24A9EDD2BAB5D49FFD301817D60 [...] cofortcol2s309.agwest.one.usda.gov>
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-2264-1236364118-541.43539-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 655
Download (untitled) / with headers
text/plain 655b
On Mon Feb 23 10:50:19 2009, William.Flynn@ftc.usda.gov wrote: Show quoted text
> Last week I reported this problem: > > Inserting more than 8,000 characters into SQL Server varchar(max) field > gives "Invalid precision value" error
Apologies for not replying to your bug report sooner. I normally get emails from the rt system when a bug is posted or changed but I have received none recently and did not notice this until I spotted the following thread on perl monks: http://www.perlmonks.org/?node_id=746522 I will try and look in to this in the next few days but I think it may already be fixed. Will get back to you soon. Martin -- Martin J. Evans Wetherby, UK


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.