Menu

#110 Empty memo string read as null in the 2.0.5.

2.0.6
closed
None
1
2014-09-29
2014-09-28
No

The new calculated field implementation works nicely, yet there could be a related regression on the memo type column.
Reading the value of an empty string on a memo column, Jackcess returns a null instead of the zero-length string value.
The 2.0.4 returned the proper empty string instead.
This obviusly doesn't happen on TEXT type columns but just on MEMO columns.

Discussion

  • Marco Amadei

    Marco Amadei - 2014-09-29

    Just one example to be sure that what I wrote above is understandable.
    if you execute the following code:


    public class Main {

    public static void main(String[] args) throws IOException {
        File file=File.createTempFile("test", "accdb");
        DatabaseBuilder dbu=new DatabaseBuilder();
        dbu.setReadOnly(true);
        dbu.setFile(file);
        dbu.setFileFormat(FileFormat.V2010);
        Database db= dbu.create();
        TableBuilder tb=new TableBuilder("test_table");
        Table t=tb.addColumn(new     ColumnBuilder("memo_column")
                                .setType(DataType.MEMO)).toTable(db);
        t.addRow("");
        for(Row r:t){
            System.out.println("Memo column value:"+r.get("memo_column")+";");
        }
        db.flush();
        db.close();
    
    }
    

    }

    with jackcess 2.0.5, it prints out:
    Memo column value:null;

    with the 2.0.4:
    Memo column value:;

     
  • James Ahlborn

    James Ahlborn - 2014-09-29
    • status: open --> closed
    • assigned_to: James Ahlborn
    • Group: Unassigned --> 2.0.6
     
  • James Ahlborn

    James Ahlborn - 2014-09-29

    Yeah, that's a stinker. apparently there were no unit tests for empty memo values. Sorry 'bout that.

    Fixed in trunk, will be in the 2.0.6 release.

     
  • Marco Amadei

    Marco Amadei - 2014-09-29

    Great, thank you!

     

Log in to post a comment.

MongoDB Logo MongoDB