4 messages in com.mysql.lists.plusplusRe: Data types - especially strings
FromSent OnAttachments
Joachim Person14 Mar 2005 11:10 
Chris Frey14 Mar 2005 12:31 
Chris Frey14 Mar 2005 12:36 
Earl Miles14 Mar 2005 12:48 
Subject:Re: Data types - especially strings
From:Chris Frey (cdf@netdirect.ca)
Date:03/14/2005 12:36:48 PM
List:com.mysql.lists.plusplus

On Mon, Mar 14, 2005 at 08:11:09PM +0100, Joachim Person wrote:

Having the following code

std::vector<CString> retV;

Result::iterator iter;

Row row;

for (iter = result.begin(); iter != result.end(); ++iter) {

row = *iter;

retV.push_back(CString(row[TABLE_NAME_SERVICE_COL_NAME_NAME]));

}

Oops, my dumb mistake, it is set to something. I should wake up completely before I post advice. :-)

My first thought would be to check what type the inner "row[TABLE_NAME...]" is returning. If it is not returning what you think it is, you may need to force it with a cast.

- Chris