![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
When I do a Get(columnID) it returns the column data in a ULValue object. Does ULValue contain a copy of the data in the actual underlying pdb database? Is there a way to get a pointer to the underlying data? I want to avoid loading a copy of the underlying data to local member variables which eats up dynamic memory. I want to be able to read the data "in place" to minimize the use of dynamic memory. Thanks. Timothy Dean MobileDataforce |
#3
| |||
| |||
|
|
The ULValue object does _not_ copy any data until you call a Get method, when it is copied to your variable/buffer. The ULValue object _does_ point directly to the value in the underlying cursor structures. This means that if you hang on to a ULValue object and call Next (i.e., fetch another row), the ULValue object will subsequently return the new row's value. - Tim "Timothy Dean" <tim.dean (AT) mobiledataforce (DOT) com> wrote in message news:4107e88f$1 (AT) forums-1-dub (DOT) .. When I do a Get(columnID) it returns the column data in a ULValue object. Does ULValue contain a copy of the data in the actual underlying pdb database? Is there a way to get a pointer to the underlying data? I want to avoid loading a copy of the underlying data to local member variables which eats up dynamic memory. I want to be able to read the data "in place" to minimize the use of dynamic memory. Thanks. Timothy Dean MobileDataforce |
#4
| |||
| |||
|
|
So the pResultSet->Get(columnID) will return a ULValue which points to the value. No copy has been made at this point, right? When you call ulvalue.GetString(buffer, bufferLength), a copy is made. Another way a copy is made is through casting, right? If I do something like: UInt16 nTest=ulvValue; a copy is made in nTest. Is there any way to get at the pointer directly so I could do something like: char *pTest=ulvValue; The above returns a compiler error. I wan't to be able to read the string in place (which means I could also modify it which is probably why you don't allow it). Timothy Dean MobileDataforce "Tim McClements" <mcclemenXnospam (AT) sybase (DOT) com> wrote in message news:410a4cae$1 (AT) forums-2-dub (DOT) .. The ULValue object does _not_ copy any data until you call a Get method, when it is copied to your variable/buffer. The ULValue object _does_ point directly to the value in the underlying cursor structures. This means that if you hang on to a ULValue object and call Next (i.e., fetch another row), the ULValue object will subsequently return the new row's value. - Tim "Timothy Dean" <tim.dean (AT) mobiledataforce (DOT) com> wrote in message news:4107e88f$1 (AT) forums-1-dub (DOT) .. When I do a Get(columnID) it returns the column data in a ULValue object. Does ULValue contain a copy of the data in the actual underlying pdb database? Is there a way to get a pointer to the underlying data? I want to avoid loading a copy of the underlying data to local member variables which eats up dynamic memory. I want to be able to read the data "in place" to minimize the use of dynamic memory. Thanks. Timothy Dean MobileDataforce |
![]() |
| Thread Tools | |
| Display Modes | |
| |