[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql-plusplus
Subject:    Re: connect and cchar
From:       Marinus Karel tenNapel <mtennapel () gbugroep ! nl>
Date:       2007-04-12 7:29:09
Message-ID: 1176362949.26028.206.camel () leviathan ! gbugroep ! nl
[Download RAW message or body]

Drew and Ovidiu, you have both been very helpful by explaining to me
that I needed c-strings AND by pointing out that Glib::ustring has this
function itself. In other words, no coding needed to do the conversion
myself. The solution was there all along.

You guys have no idea how happy this made me. Thank you very much! :)) 

Op woensdag 11-04-2007 om 18:28 uur [tijdzone +0300], schreef Ovidiu
Bivolaru:
> con.connect(database.c_str(),host.c_str(),user.c_str(),password.c_str());
> 
> Marinus Karel tenNapel wrote:
> > Hi,
> >
> > I want to create a connection to a mysql database with the use of some
> > variables. The problem is that these variables are Glib::ustring.
> >
> > Example:
> > 	Glib::ustring host = settings.get_key( "host" );
> > 	Glib::ustring database = settings.get_key( "database" );
> > 	Glib::ustring user = settings.get_key( "user" );
> > 	Glib::ustring password = settings.get_key( "password" );
> >
> > 	con.connect(database, host, user, password);
> > //Example
> >
> > The problem is that mysqlpp::Connection::connect is expecting a cchar
> > and not a Glib::ustring. So I have been trying to convert my
> > Glib::ustring to a cchar. However, I can't get it working. In fact, I
> > don't even know what a cchar is, in the first place. Or what should be
> > included so I can declare one.
> >
> > Any help with this would be most welcome.
> >
> > Thanks a lot anyway :)
> >
> > Mario 
> >
> >
> >   
> 
> 


-- 
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:    http://lists.mysql.com/plusplus?unsub=mysql-plusplus@progressive-comp.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic