db createColumn()

This commit is contained in:
Peter Mash Morgan
2010-10-05 14:51:16 +01:00
parent 99bd96c26d
commit 10351e3ee2
2 changed files with 3 additions and 2 deletions

View File

@@ -72,7 +72,8 @@ void editFieldForm::confirmEdit()
return;
}
field_name = fieldname;
field_type = typeBox->currentText();
//field_type = typeBox->currentText();
field_type = groupRadioTypes->checkedButton()->property("field_type").toString();
bool ok = pdb.createColumn(table_name, field_name, field_type);
if(!ok){
qDebug(pdb.lastErrorMessage);

View File

@@ -1260,7 +1260,7 @@ void mainForm::on_add_field(){
//QTreeWidgetItem *item = dbTreeWidget->currentItem();
editFieldForm *fieldForm = new editFieldForm( this, "editfield", true );
//qDebug(item->text(2));
fieldForm->setInitialValues(true, "TABLE_NAME", "", "NUMERIC");
fieldForm->setInitialValues(true, dbTreeWidget->currentItem()->text(0), "", "TEXT");
fieldForm->setDB(this->db);
if (fieldForm->exec())
{