List:MySQL++« Previous MessageNext Message »
From:Chris Frey Date:November 28 2005 7:14am
Subject:Re: BLOB in an SSQLS
View as plain text  
On Sun, Nov 27, 2005 at 08:51:30PM -0500, Chris Frey wrote:
> On Mon, Nov 28, 2005 at 12:38:08AM +0100, Viktor STARK wrote:
> > The problem is that - if I understood things correctly - I can only
> > define a BLOB as a std::string. And when I execute my query and try to
> > access the data in the BLOB, it stops after the first hex 00 (which is
> > "normal" since it's a string). Problem is that even if I access the
> > data() member of the string, I only get the bytes till the first 00.
> 
> Just to make sure, you've checked the size() of the string, right?
> 
> I have a bad feeling that somewhere the data is being assigned with
> operator=(), but I don't know for sure.  This would take some time,
> delving into custom.pl.

Looks like a limitation in the conversion from Row.at() into ColData, which
takes only a char* in the constructor.

I don't know if Warren has fixed this in his private/devel tree or not.
This sounds familiar to me and I don't know why. :-)

Might take me a while before I can write a patch for this, given
time constraints.  Should be easy to do, if someone wants to tackle it.
Look at Row::at(), the ColData template, and the const_string used in the
ColData typedef.  Then add an operator const std::string&() to ColData.

- Chris

Thread
BLOB in an SSQLSViktor STARK28 Nov
  • Re: BLOB in an SSQLSChris Frey28 Nov
    • Re: BLOB in an SSQLSChris Frey28 Nov
      • Re: BLOB in an SSQLSWarren Young28 Nov
        • Re: BLOB in an SSQLSChris Frey28 Nov
  • Re: BLOB in an SSQLSWarren Young28 Nov
    • Re: BLOB in an SSQLSChris Frey28 Nov
      • Re: BLOB in an SSQLSWarren Young28 Nov
      • Re: BLOB in an SSQLSViktor STARK29 Nov
    • Re: BLOB in an SSQLSViktor STARK29 Nov