c++ - ORA-00904: "E_MAIL": invalid identifier -
i using mvc architecture.i trying update record in table taking customer id input. data taken input in viewcustomer.cpp class method returning object of type customer passed function in modelcustomer.pc via controlcustomer.cpp(controller) following function of modelcustomer.pc
void modelcustomer::dbupdatecustomerdetail(customer &c) { id=c.getid(); ph=c.getid(); string memberfname=c.getfname(); string memberlname=c.getlname(); string memberstreet=c.getstreet(); string membercity=c.getcity(); string memberstate=c.getstate(); string memberemail=c.getemail(); fn=new char[memberfname.length()+1]; ln=new char[memberlname.length()+1]; street=new char[memberstreet.length()+1]; city=new char[membercity.length()+1]; state=new char[memberstate.length()+1]; e_mail=new char[memberemail.length()+1]; strcpy(fn,memberfname.c_str()); strcpy(ln,memberlname.c_str()); strcpy(street,memberstreet.c_str()); strcpy(city,membercity.c_str()); strcpy(state,memberstate.c_str()); strcpy(e_mail,memberemail.c_str()); if(dbconnect()) { exec sql update customer_1030082 set cid=:id,fname=:fn,lname=:ln,phone=:ph,street=:street,state=:state,city=:city,email=e_mail; if(sqlca.sqlcode<0) { cout<<"error in execution"<<sqlca.sqlcode<<sqlca.sqlerrm.sqlerrmc; } exec sql commit work release; } }
when i'm running menu displayed options ,i select update option asks me new details , after i'm getting following output:
connected oracle! error in execution-904ora-00904: "e_mail": invalid identifier
e_mail
not parameter, forgot :
:
exec sql … email=:e_mail; ↑
Comments
Post a Comment