-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parsing Memo Incomplete #41
Comments
Hello FourShour, Thank you for the issue and your kind words.
A record of a memo file is limited by the block size specified in the header. When writing, I do not yet check whether this limitation is exceeded by the data. |
Thanks for the quick response! I'll try out the fix when I can at the beginning of the week. I'm migrating/integrating with an old FoxPro application so dbase is new to me. Do I need to do something special in order to write a a memo value greater than the block size? I see in the DBF file that there are values that are larger than 56 characters. |
It is not possible to write a record to a memo file that is larger than the block size. If you still want to save this data, you have to change the database schema and increase the size. Can you send me the files so I can take a closer look? |
I attached the dbf and fpt files. I'm new to this tech stack so sorry if it's something obvious. The column I'm having issues with is the TRAITE column |
Unfortunately, I don't know much about DBF either, but apparently I have an error in my library that is based on a comprehension problem. A memo entry can very well be larger than one block. I will look into fixing this. |
Confirmed working now. Thanks so much! Definitely starring this repo. |
Hi All
I'm getting an error when trying to write and then read a memo field.
Write call seems to succeed with no error thrown:
But when I try to read the row I get:
panic: dbase-table-bytestorow-3:dbase-interpreter-parsememo-1:dbase-io-readmemo-5:parsing memo failed at column field: TEXT failed with error: INCOMPLETE
Here's my read code:
Full log
[dbase] [DEBUG] 2022/10/27 17:28:35 Reading row: 21 at offset: 1139
[dbase] [DEBUG] 2022/10/27 17:28:35 Converting row data (31 bytes) to row struct...
[dbase] [DEBUG] 2022/10/27 17:28:35 Reading memo block 367 at position 23488
[dbase] [DEBUG] 2022/10/27 17:28:35 Memo block header => text: true, length: 88
[dbase] [ERROR] 2022/10/27 17:28:35 dbase-io-readmemo-5:INCOMPLETE
[dbase] [ERROR] 2022/10/27 17:28:35 dbase-interpreter-parsememo-1:parsing memo failed at column field: TEXT failed with error: INCOMPLETE
[dbase] [ERROR] 2022/10/27 17:28:35 dbase-table-bytestorow-3:parsing memo failed at column field: TEXT failed with error: INCOMPLETE
[dbase] [DEBUG] 2022/10/27 17:28:35 Closing file: ./files/AAQBX.DBF
[dbase] [DEBUG] 2022/10/27 17:28:35 Closing related file: ./files/AAQBX.DBF
panic: dbase-table-bytestorow-3:dbase-interpreter-parsememo-1:dbase-io-readmemo-5:parsing memo failed at column field: TEXT failed with error: INCOMPLETE
I noticed that this only happens when "Text" is greater than 56 characters.
Thanks for all the work you guys do.
The text was updated successfully, but these errors were encountered: