List:MySQL++« Previous MessageNext Message »
From:MERE2639 Date:April 26 2005 11:40am
Subject:Fix for VC++ insert()
View as plain text  
I have found a fix to the SQLQuerry::insert() problem for VC++ 7.1

You need to use an explicit cast... 


So the method will look like....

template <class T> SQLQuery& insert(const T &v) {
(static_cast<std::stringstream&>(*this)) << "INSERT INTO " <<
v.table() << " 
(" << v.field_list()
 << ") VALUES (" << v.value_list() << ")";
return *this;
Here is a link to a very good explanation of the bug and work around...

Fix for VC++ insert()MERE263926 Apr
  • Re: Fix for VC++ insert()Warren Young26 Apr