Hello
I work on an application with qt creator and oracle
I want to add a patient in my database oracle
The patient must fill the window and then when he presses the button it must be added
The problem I do not know how to access the variable birthdate of type QDateEdite and Blood group QCombobox and sex of type radioBotton to add them in my oracle table
la5.PNG
Let's know that I usually use this code to add
exemple : add doctor
bool doctor::ajouter()
{
QSqlQuery query;
QString str= "insert into doctor values('"+specialite+"','"+nom+"','"+prenom+"','"+ pseudo+"','"+mdp+"',"+ QString::number(id)+")";
qDebug()<<str;
if(query.exec(str))
{
//QMessageBox::information(this,tr("ajouter"),tr("aj outer"));
return true;
}
else
{
//QMessageBox::information(this,tr("error::"),query. lastError().text());
return false ;
}
Bookmarks