quick/cheap method of concatenating _bstr_t or wchar_t *
Posted on 2002-06-14
I have an ADO recordset object which is giving me _bstr_t * or wchar_t *s like so:
pVal = (wchar_t *) (_bstr_t) m_pRecS->Fields->GetItem( lIndex )->GetValue();
However I am experiencing shocking performance when I try to manipulate/concatenate the resulting _bstr_t or wchar_t * with another _bstr_t or wchar_t.
Is there an efficient way of concatenating these types together? I have tried using the _bstr_t += operator and the wcscat( wcTarget, wcSource ) function, but both seem to be very slow.
Any help will be much appreciated.
Another alternative would be to make ADO give me back unicode strings if this is possible.