2,496
社区成员
发帖
与我相关
我的任务
分享
S:='ABCDE'
ADOQuery1.Active:=False;
ADOQuery1.SQL.Text:='Update A Set B='+#39+S+#39;
ADOQuery1.Active:=True;
上面代码是对表中全部数据中的B字段,更新为ABCDE值。使用中最好SQL加上条件语句:
ADOQuery1.SQL.Text:='Update A Set B='+#39+S+#39+' Where 日期=''2017-11-11''';
这样,仅对日期为双11的那天的数据有效。