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来获得数据类型 在线等
解决方案 »
- 怎么取得数据表中的行数
- Image中设置弹出菜单
- 对话框问题
- 高手帮帮我!!!
- 一个菜鸟问题~panel1.visible:=not (panel1.visible )?怎么理解?
- 怎样把文件dos.doc保存到sql server数据库中,然后再从数据库中读取文件,保存到硬盘的其他目录中?(在线)
- 怎么改变快捷菜单PopupMenu1的颜色?
- 缺省菜单项为何双击没有反应?PageControl双击事件如何响应?
- 请问在TClientSocket,TClientWinSocket中如何获得本机的名字?
- 高分相送,关于MSSQL的问题(300分)
- SQL求日期的问题
- 一个向手机或小灵通发短讯的程序
str:='alter table student add '+edit1.Text+' '+combobox1.text+'''';
showmessage(str);//目测该语句是否正确
adoquery2.SQL.Text := str;
adoquery2.ExecSQL;
adoquery1.Close;
adoquery1.Open;