Am 07.01.2013 um 20:33 schrieb Mateusz Loskot:

> On 29 December 2012 14:50, Philipp Kraus <[email protected]> wrote:
>> 
>> I use Soci for connection a PG database and a table has got an enum type.I 
>> try to create this select:
>> select * from table where enumfield = :val and val is used by soci::use with 
>> a std::string variable.
>> 
>> Soci throws the exception "invalid input value for enum". So how can I 
>> create a select statement with
>> the correct enum type, do I need also a C++ enum?
> 
> Phil,
> 
> Apology for late response, lack of time.
> Could you take a look at this thread and see if it is of any help for you?
> 
> https://sourceforge.net/mailarchive/message.php?msg_id=24352666

Thanks for this info, but I have modified my source in this case that I use a 
std::string
variable with the use call. In detail I have created this soci call:

"select ....", soci::use("abcd")

I could change my source to
std::string data("abcd")
"select ...", soci::use(data)

and this works well

Phil
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to