string conversion problems

From: alex (alex.smotritsky_at_verizon.net)
Date: 05/30/04


Date: Sat, 29 May 2004 22:56:16 -0400

i have the following line in my console app:

_bstr_t strCnn("my database connection string");

with the database connection string hard coded as above, it works, i connect
to my db.

when i read the db connection string into a string variable from the console
and try to use it or something i converted it into as the argument to strCnn
I can't connect. Any help would be appreciated.

ps

I know _bstr_t is not part of standard C++, it's a C++ class from microsoft.

there's info on _bstr_t all over the web but i still can't get my code to
work so i'm posting here.

 Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
                http://www.usenet.com

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---



Relevant Pages

  • Re: string conversion problems
    ... > i have the following line in my console app: ... > with the database connection string hard coded as above, ...
    (comp.lang.cpp)
  • Re: .Net Codepage 850 problem with uppercase accented characters
    ... > I have just tried a console app. ... you don't convert the characters in the string into glyphs at ... You may find that the connection string is the place to specify the ... character set, although I would have thought you shouldn't need to do ...
    (microsoft.public.dotnet.framework)
  • Re: string conversion problems
    ... >> with the database connection string hard coded as above, ... > Just out of morbid curiosity, ...
    (comp.lang.cpp)
  • RE: Q: why am I getting this
    ... Doesn't sound like a database connection string problem. ... Are you getting prompted to login when you view .aspx file ... > requested URL. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How to encrypt password when using UDL files for connection string?
    ... database connection string, dbname, database username and password. ... encrypting the password in the UDL while keeping the UDL file itself. ... Would it not be better to use say an INI file to contain your connection details (hence preserve the notepad type ability to edit the connection string) as then you could use any type of encryption to protect your passwords as you are going to have to decode it anyway. ...
    (microsoft.public.vb.general.discussion)