Access memo-field causes trouble
by "Kamphuijs, ing. K.G." <K.G.Kamphuys(at)FD.AGRO.NL>
|
| Date: |
Thu, 20 Apr 2000 14:27:58 +0200 |
| To: |
"'hwg-servers(at)hwg.org'" <hwg-servers(at)hwg.org> |
| |
todo: View
Thread,
Original
|
|
Hi all,
I have a nasty problem with connecting an Access database to my web.
Using DBI and DBD-ODBC, I try to read data from an Access database that
contains a memo field. When I include this field in the select statement,
the fetchrow_array-function fails giving the following message:
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC Microsoft Access 97
Driver]Data truncated (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated)
err=1) at E:\LNV_scripts\smoelenboek\smoelenboek.pl line 229.
The field is typically filled with 2KB of plain text. For a few records
where this field contains only a few words, there is no problem.
Does anyone know how to solve that problem. Strange enough I was able using
DBI and an SQL insert command to fill the memo field with this information
without any problem.
Used code:
$query = "SELECT * FROM $table where $where";
$dbh = DBI->connect("dbi:ODBC:$datasource") || print "connection with
$datasource failed: $DBI::errstr";
$sth = $dbh->prepare($query) || print "unable to prepare query $query:
$DBI::errstr";
$rc = $sth->execute || print "unable to execute query $query: $DBI::errstr";
while (@row = $sth->fetchrow_array) {
print @row;
}
$dbh->disconnect;
The code is used in a CGI process using Microsoft IIS4 on NT4, activeperl
518, with an Access 95 database. Upgrading to Access 97 didn't solve the
problem.
Thanks in advance for answering,
--
Koen Kamphuys (k.g.kamphuys(at)fd.agro.nl)
Tech webmaster of www.agro.nl and www.minlnv.nl
***Message created entirely with speech recognition***
HWG: hwg-servers mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.