List:MySQL++« Previous MessageNext Message »
From:sinoth Date:April 29 2010 6:27am
Subject:Re: Insert BLOB from file without extra copy
View as plain text  
>
> std::ifstream in(filename);
> Query query = conn.query();
> query << "INSERT INTO images (data) VALUES(\"" <<
>                mysqlpp::escape << in.rdbuf() << "\")";
>

That did the trick, thank you!

Thread
Insert BLOB from file without extra copysinoth28 Apr
  • Re: Insert BLOB from file without extra copyme2228 Apr
    • Re: Insert BLOB from file without extra copysinoth28 Apr
  • Re: Insert BLOB from file without extra copyJonathan Wakely28 Apr
    • Re: Insert BLOB from file without extra copysinoth29 Apr