delphi DateTimePicker控件更新SQL数据库,数据库里面怎么达不到日期,而显示的年份1905,都准。望高手指点指点。程序怎么写?
问题补充:更新年月日,但是SQL显示都不是我设置的日期
代码:adoquery3.close;
adoquery3.sql.clear;
s4:='update shujuk set username='+quotedstr(trim(edit2.text))
+', 日期='+datetostr(DateTimePicker1.Date)
+' where iduser='+quotedstr(trim(edit1.Text));
Adoquery3.sql.add(s4);
Adoquery3.ExecSQL;
就按这代码写的,那里有错呢?
代码:adoquery3.close;
adoquery3.sql.clear;
s4:='update shujuk set username='+quotedstr(trim(edit2.text))
+', 日期='+datetostr(DateTimePicker1.Date)
+' where iduser='+quotedstr(trim(edit1.Text));
Adoquery3.sql.add(s4);
Adoquery3.ExecSQL;
就按这代码写的,那里有错呢?