A
alex
i have a string "dasfk" stored in a variable of type string and i want to
convert it to const _bstr_t, anybody know?
convert it to const _bstr_t, anybody know?
alex said:i have a string "dasfk" stored in a variable of type string and i want to
convert it to const _bstr_t, anybody know?
alex said:i have a string "dasfk" stored in a variable of type string and i want to
convert it to const _bstr_t, anybody know?
alex said:i have a string "dasfk" stored in a variable of type string and i want to
convert it to const _bstr_t, anybody know?
Phlip said:This newsgroup is qualified to discuss std::string, but not _bstr_t. Use
Google Groups to learn what newsgroups know about it.
However, to convert a std::string z to anything that accepts a char const *,
use z.c_str().
alex said:z.c_str() results in successful compilation of the code but the database
connection i'm trying to make doesn't work. I think this is purely a string
conversion problem because when I put the database connection string in as
"bla bla" it works.
alex said:i have a string "dasfk" stored in a variable of type string and i want to
convert it to const _bstr_t, anybody know?
Jorge Rivera said:Isn't _bstr_t a Microsoft thing?
If it is, try in Microsoft.public.visualc.
I think what you have to do is:
_bstr_t mBstr = _bstr_t("daskf");
and then pass this to whatever function you need.
JLR
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.