How to convert between Progress [] database datatype and C # strings?

Progress databases allow the use of the Character [x] data type. How can I write a specific x using C # and ODBC?

Please do not answer if you do not understand what the [x] symbol means ... this is not a string (array of characters), it is an array of strings (which are arrays of characters).

+1


source to share


3 answers


I understood that. The documentation I mean is for the symbol data type [20], format x (24). character [x] (where x is a number), looks like an array of strings. The x (24) format means that each line in the array can contain 24 characters.

Essentially characters [20], format x (24) is a string of 20 * 24 characters with each "array element" separated by a semicolon (;).

If the "parameters" column is defined as the character [20], x (24), then to fill it with lines from 1 to 20, you just need to write:



row.options = "1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; 20";

To fill in all blank lines write:

row.options = ";;;;;;;;;;;;;;;;;;;";

+2


source


The x (24) format means that each line in the array can contain 24 characters.



Not quite the exact format - DISPLAY format, which is used by many Progress procedures when displaying / printing / exporting this field. All character fields, whether they have degree or not, are stored in DB as a variable length string. Thus, you can easily retrieve up to 32K data in each of the 20 extents.

+2


source


The Progress ODBC Driver Guide doesn't seem to mention this type at all?

0


source







All Articles