Search the web
Sign In
New User? Sign Up
DatabaseTemplateLibrary · The Database Template Library
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Can't convert 'const char[125]' to 'const dtl::tstring&' in ...conne   Message List  
Reply | Forward Message #2391 of 2479 |
Re: Can't convert 'const char[125]' to 'const dtl::tstring&' in ...connect()

tstring is just an alias for std::string if unicode is not defined.
Here it wants a reference to a std::string so just give a std::string
explicitly.

tstring DSN_str("removed");
DBConnection::GetDefaultConnection().Connect(DSN_str);


Thanks for using DTL,

Corwin

--- In DatabaseTemplateLibrary@yahoogroups.com, "pimiento333"
<apoc@...> wrote:
>
> Hi,
>
> I've got a problem I can't narrow down for days. In a small test
> project I can use dtl without any problems. Inside my current project
> I alwas get the following compiler error using vs 2003:
>
> 'const char[125]' to 'const dtl::tstring&' in in the line
> dtl::DBConnection::GetDefaultConnection().Connect("removed");
>
> Any ideas how to aproach this problem? Char encoding is set to nothing
> specific.
>
> Kins regards,
> Chris
>





Wed Mar 12, 2008 2:55 am

corwinjoy
Offline Offline
Send Email Send Email

Forward
Message #2391 of 2479 |
Expand Messages Author Sort by Date

Hi, I've got a problem I can't narrow down for days. In a small test project I can use dtl without any problems. Inside my current project I alwas get the...
pimiento333
Offline Send Email
Mar 12, 2008
2:49 am

tstring is just an alias for std::string if unicode is not defined. Here it wants a reference to a std::string so just give a std::string explicitly. tstring...
Corwin Joy
corwinjoy
Offline Send Email
Mar 12, 2008
2:55 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help