Discussion:
[soci-users] (no subject)
Witold E Wolski
2013-10-15 14:44:17 UTC
Permalink
std::string p1 = "insert into sample(name, file, description )";
p1 += " values(:name,:file, :description)";

While this code WORKS for me.

sql_ << p1, use(name),
use(file),
use(description);

This one does not:

sql_ << p1, use(name,":name"),
use(file,":file"),
use(description,":description");
;

C++ exception with description "Cannot bind to (by name) ::name"
thrown in the test body.

Would really like to get version 2 working.

regards
--
Witold Eryk Wolski
Rodrigo Madera
2013-10-15 14:53:19 UTC
Permalink
Witold,

Drop the ":" in use:

use(description,":description"); --> use(description,"description");

Good luck,
Rodrigo
Post by Witold E Wolski
std::string p1 = "insert into sample(name, file, description )";
p1 += " values(:name,:file, :description)";
While this code WORKS for me.
sql_ << p1, use(name),
use(file),
use(description);
sql_ << p1, use(name,":name"),
use(file,":file"),
use(description,":description");
;
C++ exception with description "Cannot bind to (by name) ::name"
thrown in the test body.
Would really like to get version 2 working.
regards
--
Witold Eryk Wolski
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
soci-users mailing list
https://lists.sourceforge.net/lists/listinfo/soci-users
Loading...