Thank you for the reminder, Mr. Archer.  

The basic_string is actually stored as part of a STL map and is fairly 
long-lived; once it is created, it remains until the plugin's destructor clears 
the map.

R,
John


> -----Original Message-----
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
> On Behalf Of jeff archer
> Sent: Sunday, December 19, 2010 4:21 PM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] Troubleshooting...
> 
> >> My only guess is that basic_string::c_str() doesn't really provide a 
> >> pointer to
> >>a null-terminated c-style string, >but a facsimile of one that SQLite 
> >>doesn't
> >>like.
> >
> >c_str() provides pointer to the data that string has with additional
> >null byte added at the end. That's it. Whether it is a null-terminated
> >c-style string depends on what data you put into it. If that data has
> >null bytes in it then SQLite will see only part of your string, though
> >I'm not sure that it was the actual problem you have seen.
> 
> You may probably already know this but maybe I'll remind you.  The pointer
> returned by c_str() is only valid in the statement where it is used or 
> possibly
> as long as the life of the basic_string<char> it came from.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to