Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2002
    Location
    Australia
    Posts
    2

    Post Unanswered: Memo Field which hass more than 255 chars and Perl

    I have an access 2000 format table which has a memo field in it.
    When I try to retrieve all the records for display on a perl/html page the only records that show are the ones where the memo field contains less than 255 charcters.

    If I change one of the records that does get displayed to contain more than 255 chars in the memo field and then refresh my perl/html page , the record is no longer shown.

    I get no error messages that would indicate an sql error. I can display perl variables that have more than 255 chars as I tested this to see if perl had a limitation on the length of its variables. I have tested with and without special characters and that made no difference.

    $description is the memo field.

    my code in perl is as follows for each record id .The code below loops thru the records.

    $sql2="SELECT * FROM bookshop WHERE id=$id";
    print $sql2
    $sth2=$dbw->prepare_cached($sql2) || die print "Error ".$sql2.$dbw->errstr;
    $sth2>execute || die print "Could Not Execute SQL Statement ".$sql2.$dbw->errstr;

    while (($id,$code,$title,$description,$keywords,$media,$ rrp,$author,$year)=$sth2->fetchrow_array)
    {


    print qq^
    <tr>
    <td><a href="/admin/add_bookshop.plx?code=$code">$code</a> </td>
    <td>$title </td>
    <td>$description </td>
    <td>$author </td>
    <td>$year </td>
    </tr>
    <tr><td colspan=$colspan>&nbsp;</td></tr>^;

    }#endwhile

    The SQL statements for all the records are printed for debugging purposes but the record for each sql statement is only displayed if the length of the memo field is less than 255.???

  2. #2
    Join Date
    Sep 2002
    Location
    Coventry, Warwickshire, UK
    Posts
    74
    Not knowing Perl, your explanation would suggest that Perl does not recognise the field as a Memo field but rather as a Text field.

    Access holds Memo fields as a separate file with a reference to that file in the Memo field in the table. However, if Perl picks up the text if it is less that 255 characters, would suggest that Access stores the text in the Access table as a Text field rather than create a separate file if the length of the Memo field is less that 255 characters. This is only a guess on my part, but would seem to be borne out by your experience.
    Roger Hampson
    XI - ecs (UK) Ltd

  3. #3
    Join Date
    Sep 2002
    Location
    Australia
    Posts
    2

    Smile

    I actually worked out my own problem which was in fact related to PERL.
    I was usin DBI DBD data interfaceing and found that as soon as I changed over to win32::ODBC database interface everything worked.

    I remebered that DBI runs better than Win32::ODBC but "has limitations" and this problem seemed to be one of them.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •