THANKS!
I think,when field's FieldDataType is defined ftString (fixed length),you put ds_string* into cRawBuffer ?
you know ,the fixed ftstring can be taked for char[n], maybe you can put actual data into
cRawBuffer.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When the database field type is "string" (fixed length or not), the field data type in the dataset is "ftString" and the cRawBuffer contains a "ds_string *".
For a fixed length string having a char array in the buffer is a solution but it makes the code a bit more complicated (you have to cater for fixed and variable strings and track the used space in the char[]) and you must allocate space which is not always used.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The code is not like your example. It is rather like this:
void *str_ptr = new ds_string();
void *str_ptr_ptr = &str_ptr;
ds_string **data = reinterpret_cast<ds_string **>(str_ptr_ptr);
See the construct, copy_construct and destroy member functions.
THANKS!
I think,when field's FieldDataType is defined ftString (fixed length),you put ds_string* into cRawBuffer ?
you know ,the fixed ftstring can be taked for char[n], maybe you can put actual data into
cRawBuffer.
When the database field type is "string" (fixed length or not), the field data type in the dataset is "ftString" and the cRawBuffer contains a "ds_string *".
For a fixed length string having a char array in the buffer is a solution but it makes the code a bit more complicated (you have to cater for fixed and variable strings and track the used space in the char[]) and you must allocate space which is not always used.