Access 2000 Memo Fields

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
raven
Forum Newbie
Posts: 3
Joined: Tue Aug 20, 2002 5:56 pm

Access 2000 Memo Fields

Post by raven »

When I try to retrieve the contents of a memo field from an Access 2000 database, it only returns the first 255 characters.

I've tried using:

Code: Select all

odbc_longreadlen($result, 16384);
but it still only returns 255 characters.

I'm running PHP 4.2.0/Apache 2/Windows XP
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Post by jason »

Unless they changed it, the MEMO type fields in Access can only be 255 character's long.
raven
Forum Newbie
Posts: 3
Joined: Tue Aug 20, 2002 5:56 pm

Post by raven »

A Text field can be up to 255.
A Memo field can be up to 64k.

The data is there in full in the database field, I just can't get it using odbc_result().
User avatar
hob_goblin
Forum Regular
Posts: 978
Joined: Sun Apr 28, 2002 9:53 pm
Contact:

Post by hob_goblin »

from the manual:

(ODBC SQL types affected: LONG, LONGVARBINARY) The number of bytes returned to PHP is controled by the parameter length. If it is set to 0, Long column data is passed thru to the client.
raven
Forum Newbie
Posts: 3
Joined: Tue Aug 20, 2002 5:56 pm

Post by raven »

If I use

Code: Select all

odbc_longreadlen($result, 0);
then odbc_result() returns an empty string
Post Reply