[freetds] DBD::ODBC::st fetchrow_hashref failed: [unixODBC][FreeTDS][SQL Server]Data truncated (SQL-01004)

Buurman, H.A. (Herbert) h.a.buurman at interlogica.nl
Tue May 19 02:30:30 EDT 2009


> -----Original Message-----
> On Tuesday, 19 May, 2009 00:09, James K. Lowden wrote:
> 
> Buurman, H.A. (Herbert) wrote:
> > 
> > my $ExampleQuery = $dbh->prepare("SELECT Identifier FROM Table WHERE
> > Identifier = ?");
> > my $Record_ref;
> > my $Identifiers_ref = $dbh->selectcol_arrayref("SELECT TOP 
> > 10 Identifier FROM Table WHERE SomeCondition > 0");
> > foreach (@{$Identifiers_ref}) {
> >     $ExampleQuery->execute($_);
> >     if ($Record_ref = $ExampleQuery->fetchrow_hashref()) {
> >         foreach (keys %{$Record_ref}) { 
> >             print("$_ => > $Record_ref->{$_}, "); 
> >         } 
> >         print("\n");
> >     } else {
> >         print("Error fetching data for item [$_]\n");
> >     }
> >     $ExampleQuery->finish();
> > }
> 
> Is this a Sybase or Microsoft server?  DBI Placeholders are 
> not expected to work with TDS 7.0+.  
> 

This is with a Microsoft server v9.0.2047 x86, using TDS 8.0.

The placeholders are working just fine, with the exception of
stored procedure calls. In that particular case, things only work
if you're only using one placeholder. (At least, this was the case
with tdsodbc v0.63-3.2. I haven't tested it with v0.82-5 yet).
But that's another story :)

Best regards,
H. Buurman

(Be warned: automatically attached html-coded corporate signature starts here)

<html>
<body>
<pre style="font-size: 7.5pt; font-family: Arial; color: black; font-style: italic; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin-bottom: .0001pt">&nbsp;<pre style="font-size: 7.5pt; font-family: Arial; color: black; font-style: italic; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin-bottom: .0001pt"><span lang="nl"><font color="#C0C0C0" style="font-size: 7pt" face="Arial"><i><b><u>Disclaimer</u>

Deze e-mail is verzonden door Interlogica B.V. De inhoud en eventuele bijlagen zijn vertrouwelijk en uitsluitend bestemd voor de
geadresseerde. Interlogica B.V. verzoekt bij onjuiste adressering direct contact met haar op te nemen (<a href="mailto:info at interlogica.nl">mailto:info at interlogica.nl</a>),
de naam van de afzender en de geadresseerde aan haar op te geven en vervolgens dit e-mailbericht uit uw systeem te verwijderen.
Interlogica B.V. is niet aansprakelijk voor het overbrengen van virussen en het is uw verantwoordelijkheid deze e-mail (en eventuele
bijlagen) te controleren. Interlogica B.V. (geregistreerd bij het Handelsregister nr. 08067177) is gevestigd te Ecofactorij 20,
NL-7325 WC Apeldoorn.

This is an e-mail from Interlogica B.V. Its contents and any attachments are confidential and intended solely for the use of the
individual to whom it is addressed. If received in error, please contact Interlogica B.V. (<a href="mailto:info at interlogica.nl">mailto:info at interlogica.nl</a>)
quoting the name of the sender and the addressee, then delete it from your system. Please note that Interlogica B.V. does not accept any
responsibility for viruses and it is your responsibility to scan the email and any attachments (if any). Interlogica B.V. 
(registered with the Chamber of Commerce no. 08067177) is resident at Ecofactorij 20, NL-7325 WC Apeldoorn, The Netherlands.
</b></i>
</font>
<p>&nbsp;</p>
</body>
</html>



More information about the FreeTDS mailing list