Database command

profilem.s11

 

MySqlCommand^ cmdDatabase = gcnew MySqlCommand("insert into information.user (Name,Email,Gender,Age) values('"+this->NameT->Text+"','"+this->EmailT->Text+"', '" + this->GenderT->Text + "','"+this->AgeT->Text+"') ;", conDataBase);


I wrote This command to store the data to the database, but I have another table has more information. So what is the that allow me to insert with both tables. I have already did the join in the database and I have tried to write this code on visual studio but it did not work. Please help


MySqlCommand^ cmdDatabase = gcnew MySqlCommand ("insert into a.,b. information.user a (Name,Email,Gender,Age)values('"+this->NameT->Text+"','"+this->EmailT->Text+"', '" + this->GenderT->Text + "','"+this->AgeT->Text+"') , information.date b (appointment) values('" + this->appointmentPicker->Text + "')", conDataBase);

    • 8 years ago
    • 4
    Answer(0)
    other Questions(10)