This page contains miscellaneous programmer support information - such as contentions we've used and nonstandard data descriptions.
The string format information listed below will NOT be required by most developers because there are API calls that make direct manipulation unnecessary.
We've used a standard set of prefix characters for field names exported from the DLL, field names in Access databases, and variable names in program code.
Because they occur so often in OfficeQ, they are worth memorizing.
|s||string of any size|
|t||memo database field|
|n||whole number (regardless of number of bits)|
|r||real number (single, double, etc. - regardless of bit count). In QuickBooks, there are some variables that can have either a dollar amount or a percentage. These are prefixed with r and have a corresponding b field that's True if it's a percentage. For percentages, the amount is a multiplier (already divided by 100)|
|m||Money amount (in VB/VBA environment, typically has 4 decimal places. In QuickBooks, dollar amounts always have 2 decimal places.|
|b||Boolean (True or False)|
|d||Date or DateTime. Formatting ...|
|k||Foreign key (matches a primary key value in another table). Conceptually the data type is insignificant - however with these data structures, the field is always a 32 bit positive integer.|
A record consists of multiple variables. Each variable contains both a variable name and a variable value. A record is just a simple concatenation of those variables into a single string. Note that the variables may be in any order.
Non printable ASCII characters are used before both the variable name and variable value. (Note that this is different from many other formats where special characters are used to separate or end the string(s) - not at the start). This format is used to encode a series of variables, with separated names and values into a single ASCII string. The following character ranges (when converted to hex) delineate boundaries within the string:
1E - start of new variable - name characters follow (rs =record separator) 1C - start of value - value characters follow (fs =field separator)
Note that when viewing records through a hex viewer - each 0x1E value is the start of another field. All field values are in ASCII and correspond with our field level documentation.
Example: record as returned from RecordN or RecordK
The following is a short example. The string is divided into lines of 16 characters each - broken up into 4 character chunks for readability. Record separators (rs = 1E) and field separators (fs = 1C) are shown intermixed with the printable ASCII characters.
sName - Sam nAge - 38 1E 73 4E 61 6D 65 1C 53 61 6D 1E 6E 41 67 65 33 rs s N a m e fs S a m rs n A g e 3 38 8
Example: Named transaction counts as returned from ReadPartial
Here is a record containing the count of each transaction type - as returned from the ReadPartial function. This is formatted similar to a record - except the transaction type is used as the name and the count of transactions of that type is used as the value.
trancount=3521 custinvc=1063 custpymt=942 cashsale=1516 1E 74 72 61 6E 63 6F 75 6E 74 1C 33 35 32 31 1E rs t r a n c o u n t fs 3 5 2 1 rs 63 75 73 74 69 6E 76 63 1C 31 30 36 33 1E 63 75 c u s t i n v c fs 1 0 6 3 rs c u 73 74 70 79 6D 74 1C 39 34 32 1E 63 61 73 68 73 s t p y m t fs 9 4 2 rs c a s h s 61 6C 65 1C 31 35 31 36 a l e fs 1 5 1 6
Parameter lists are arrays of data compressed into a single string similar to records - except they consist of variable values only (no names). They may be used an input parameters to functions or as output parameters from functions.
Example: Array of transaction types passed to ReadResume
The following is a short example of a string returned expected by ReadResume. It is communicating that the caller only wants additional transaction detail for transaction types custinvc, custpymt, and cashsale.
custinvc custpymt cashsale 1E 63 75 73 74 69 6E 76 63 1E 63 75 73 74 70 rs c u s t i n v c rs c u s t p 79 6D 74 1E 63 61 73 68 73 61 6C 65 y m t rs c a s h s a l e