初学者 出现错误incompatible types: 'string' and 'TEdit'请教高手指点一二!procedure TForm_usergl.btnaddClick(Sender: TObject);
var
sex,sql:string;
begin
sex:='男';
if rb_woman.Checked then sex:='女';
sql:='insert into student(stuNO,stuname,stusex,stubirth,stuaddress,classid)values('''+edt_stuNO+''','''+edt_stuname+''','''+sex+''','''+cbb_year-cbb_month-cbb_day+''','''+edt_stuaddress+''','''+GetclassidFromName(cbb_class.Text)+''')';
ExecuteFromSQL(sql);
LoadData;
DM3.ADOQuery1.Last;
end;
var
sex,sql:string;
begin
sex:='男';
if rb_woman.Checked then sex:='女';
sql:='insert into student(stuNO,stuname,stusex,stubirth,stuaddress,classid)values('''+edt_stuNO+''','''+edt_stuname+''','''+sex+''','''+cbb_year-cbb_month-cbb_day+''','''+edt_stuaddress+''','''+GetclassidFromName(cbb_class.Text)+''')';
ExecuteFromSQL(sql);
LoadData;
DM3.ADOQuery1.Last;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货