The error indicates that the raw data retrieved from a Palm record wasn't enough to satisfy the requirements of your field definitions. As far as I know, there is nothing wrong with the conduit's field handling, so the problem is likely to be in your field definitions.
A few things to remember:
- Alignment. This is a feature people sometimes forget. If, for example, you set alignment for every 2 bytes, a single byte field not followed by another byte field then the field will take up two bytes.
- String handling. Make sure that if the string field is fixed length that you correctly specify the length. Also remember that with alignment on, the following field, if not a string, will be pushed to the next alignment boundary
One of the best things to do when getting this record is to do some debugging. Set some breakpoints in the RemoteRecordToLocal method and trace through the code as it unpacks the records into the table fields. You can thus quickly figure out if the raw record data isn't precisely matching your field definitions
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-10-16
My string length are variable and I have found that using a Date type rather than datetime is ok.
The field size for a datetype is 2, and from what I can gather a field size for datetime type is 14. Why would the size change for a datetime type?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Because they're two completely different types. A Palm DateType represents a date as a 16-bit value with 7 bits for the number of years since 1904, 4 bits for the month number, and 5 bits for the day number.
A DateTimeType on the other hand stores both a date and time in one structure. It also uses a full 16-bits for the year, so it can handle dates both before 1904 and after 2032, which the DateType can't.
Check out the Palm OS Reference documentation for more information on the various date/time types.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was using only string fields and everything was ok. Now that I need a DateTime field in my database, I'm getting the error:
"A mapped field went beyond the end of the physical record structure."
Everything seems ok for me, I have all fields in the same type and order in both Palm and Delphi.
I'm using PocketStudio for the PalmOS application.
Any help will be appreciated.
Anyone have any luck with this.
Same situation
Tristan
The error indicates that the raw data retrieved from a Palm record wasn't enough to satisfy the requirements of your field definitions. As far as I know, there is nothing wrong with the conduit's field handling, so the problem is likely to be in your field definitions.
A few things to remember:
- Alignment. This is a feature people sometimes forget. If, for example, you set alignment for every 2 bytes, a single byte field not followed by another byte field then the field will take up two bytes.
- String handling. Make sure that if the string field is fixed length that you correctly specify the length. Also remember that with alignment on, the following field, if not a string, will be pushed to the next alignment boundary
One of the best things to do when getting this record is to do some debugging. Set some breakpoints in the RemoteRecordToLocal method and trace through the code as it unpacks the records into the table fields. You can thus quickly figure out if the raw record data isn't precisely matching your field definitions
My string length are variable and I have found that using a Date type rather than datetime is ok.
The field size for a datetype is 2, and from what I can gather a field size for datetime type is 14. Why would the size change for a datetime type?
Because they're two completely different types. A Palm DateType represents a date as a 16-bit value with 7 bits for the number of years since 1904, 4 bits for the month number, and 5 bits for the day number.
A DateTimeType on the other hand stores both a date and time in one structure. It also uses a full 16-bits for the year, so it can handle dates both before 1904 and after 2032, which the DateType can't.
Check out the Palm OS Reference documentation for more information on the various date/time types.