|
发表于 2020-1-3 12:12:01
|
显示全部楼层
Sql := 'update ZW.BZ set workdate = ''' + DateToStr(Self.DateTimePicker1.Date) + '''+', BANZU = ''' + Trim(ComboBox1.Text) + '''+', car = ''' + Trim(Edit1.Text) + ''' where banzu = ' + (Query1.FieldByName('banzu').AsString);
----------------------------------------------------------------------
这样写有点乱;
sql := format('update zw.bz set workdate = ''%s'', Banzu = ''%s'', car = ''%s'' where banzu = ''%s'' ',[DateToStr(Self.DateTimePicker1.Date),Trim(ComboBox1.Text),Trim(Edit1.Text),Query1.FieldByName('banzu').AsString]);
|
|