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

"James K. Lowden" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
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+.  

--jkl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.