List:MySQL++« Previous MessageNext Message »
From:Roger (COM Chantry CA) Urscheler Date:September 28 2006 4:21pm
Subject:Mysql++ list post
View as plain text  
Can you please post this question:

I have a table 'Person' with column 'age' that allows NULL. How can I use
SSQLS to read that table and return '0' for age if age is 'NULL'? 

What type do I need to define in the SSQLS macro to have an integer
nullable. Do I define the SSQLS like this:

    typedef mysqlpp::Null<int, mysqlpp::NullisZero> MyIntNull;
    sql_create_c_order_2(Person, 1, 2,
        string,        name,     0,
        MyIntNull,   age,   1)

When defining age with type int and the age in the database is 'NULL', then
I get a runtime error in Query::storein 


Mysql++ list postCOM Chantry CA)28 Sep
  • Re: Mysql++ list postWarren Young28 Sep
RE: Mysql++ list postJim Wallace29 Sep