String Requirements
The Import Wizard imposes the following requirements on strings provided by an import filter:
- All strings in the data structures must end with a null terminating character. This is important when mapping data structures from your accounting system's data file into control structures required by the Import Wizard. You may need to do some additional processing to put the strings in the proper format.
- Empty strings should be null terminating characters. However, for structures related to financial information—specifically CMA_ACCTPART, CMA_ACCTPARTCODE, CMA_JOURNALENTRY, CMA_JOURNALDETAIL, CMA_PART, and CMA_PARTCODE—empty strings must actually be a single space followed by a null terminating character. A string in these structures cannot have a length of zero; that is, it cannot be a null terminating character by itself.
- Field sizes defined in the SBCM API and Data Structure Reference are twice as long as those defined in Aacommon.h in order to accommodate double-byte characters (DBCS). If you aren't developing a filter for a DBCS system, you need to use string definitions as specified in this SDK and trap for longer strings to prevent filter problems. In other words, the character length for all strings should be less than or equal to the maximum length of the field specified in Aacommon.h (for example, MAX_CMA_CONTACT). Use the definitions in Aacommon.h rather than
sizeof()
to determine the size of the data structure. If you exceed the limit, the import will fail.
- In general, avoid the use of any characters that are operators in SQL (for example, single and double quotation marks) ; the use of such characters may cause unexpected results when built into SQL statements.