b := false;
for i:=0 to adoquery1.FieldCount-1 do
begin
if Edit1.Text = ADOquery1.Fields[i].FieldName then
mbobox1.Text=adoquery1.Fields[i].d
begin
showMessage('字段已经存在 不能重复');
b := false;
end
else
b:= true;
end;
if b then
begin
adoquery2.Close;
adoquery2.SQL.Text := 'alter table student add '+
edit1.Text+' varchar(30) null ';
adoquery2.ExecSQL;
adoquery1.Close;
adoquery1.Open;
end;
如何把' varchar(30) null '改成用combobox来获得数据类型 在线等
for i:=0 to adoquery1.FieldCount-1 do
begin
if Edit1.Text = ADOquery1.Fields[i].FieldName then
mbobox1.Text=adoquery1.Fields[i].d
begin
showMessage('字段已经存在 不能重复');
b := false;
end
else
b:= true;
end;
if b then
begin
adoquery2.Close;
adoquery2.SQL.Text := 'alter table student add '+
edit1.Text+' varchar(30) null ';
adoquery2.ExecSQL;
adoquery1.Close;
adoquery1.Open;
end;
如何把' varchar(30) null '改成用combobox来获得数据类型 在线等
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货