List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:September 26 2006 7:36am
Subject:Re: Reading Writting BLOB VARBINARY Q.
View as plain text  
Ankur G35 Saxena wrote:
> Hi, I wanted to read and write a C++ structure to the DB.

Bad, bad idea.  For this to be guaranteed to work, you could never 
upgrade your compiler version or change compilers.  You can't even 
change some compiler options even if you were willing to stick with a 
single compiler, because there are options that will change the binary 
layout of your classes.

Do a Google search for object serialization in C++.  There are ways to 
get around this problem, many of which will solve the BLOB problem as a 
side effect.

Or, switch to a language that understands things like serialization and 
reflection.  This is one of the things that C++ is just not good at.
Thread
Reading Writting BLOB VARBINARY Q.Ankur G35 Saxena24 Sep
  • Re: Reading Writting BLOB VARBINARY Q.Bill K24 Sep
  • Re: Reading Writting BLOB VARBINARY Q.Warren Young26 Sep
    • Re: Reading Writting BLOB VARBINARY Q.Warren Young26 Sep
    • Re: Reading Writting BLOB VARBINARY Q.Bill K26 Sep