Thank you both for your replies. If you hadn't guessed I'm not a database/oracle guy, just a programmer trying to get along. I didn't realize that VARCHAR was so generalized as our application just uses it for strings. I've looked at the code generated by the Oracle preprocessor and I have to agree, it's huge!!
One of the things I was trying to do with my wrapper class was to automate some of the 'clean up' required when accessing VARCHAR after a database query. We have to append a '\0' to the end of every VARCHAR as Oracle doesn't do this. It's just plain awkward to see my team doing this everywhere in their code, yuck! Perhaps what I'll do is add an std::string object to my class and copy the VARCHAR string into it. The string object will be the only publicly accessible member of the class. I will have to think about how to free the memory hogged up by a VARCHAR after I've gotten the data into a std:string object. Any thoughts on this?
I had two concerns with my original question: how to reuse the already allocated memory of the VARCHAR. And preventing the buffer from growing, as would be the case if I just copied it to a std::string.
Thanks for your input,
Doug Farrell