Hi Caleb,<br><br><br><div class="gmail_quote">On Mon, Sep 21, 2009 at 12:32 AM, Caleb Cushing <span dir="ltr"><<a href="mailto:xenoterracide@gmail.com" target="_blank">xenoterracide@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
tran.exec("INSERT INTO korama.tracks ( file_path, title ) VALUES ('"<br>
+ tran.esc(iter->path())<br>
+ "','"<br>
+ tran.esc(iter->path())<br>
+ "');"<br>
);<br>
trying to insert the path() (using boost::filesystem) into the<br>
database but I can't get it to compile. I've tried various variations<br>
of concatenating the strings in exec... none work, and each withe<br>
different errors. any help would be appreciated.<br>
<font color="#888888"><br></font></blockquote><div><br><br>operator+ is not implemented for const char*. <br><br>Trying something like:<br><br> tran.exec(std::string("INSERT INTO korama.tracks ( file_path, title ) VALUES ('")<br>
+ tran.esc(iter->path())<br>
+ "','"<br>
+ tran.esc(iter->path())<br>
+ "');"<br>
);<br> <br>will probably do the trick,<br><br>Kind regards,<br>Maurice<br><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<font color="#888888">
--<br>
Caleb Cushing<br>
<br>
<a href="http://xenoterracide.blogspot.com" target="_blank">http://xenoterracide.blogspot.com</a><br>
_______________________________________________<br>
Libpqxx-general mailing list<br>
<a href="mailto:Libpqxx-general@pgfoundry.org" target="_blank">Libpqxx-general@pgfoundry.org</a><br>
<a href="http://pgfoundry.org/mailman/listinfo/libpqxx-general" target="_blank">http://pgfoundry.org/mailman/listinfo/libpqxx-general</a><br>
</font></blockquote></div><br>