我建了个表,里面有个列是‘建表时间’属性为datetime,我现在想以系统当前时间(日期,不含时间)为搜索对象对表中的记录进行搜索,请问我该怎么写这个语句?adodataset1.Active:=false;
adodataset1.CommandText:='select * from 员工考勤表 where 编号='+Edit1.Text+'';
ADODataSet1.Active:=true;以上是我以编号为对象进行的记录搜索,如果改为以当前时间为对象进行记录搜索该怎么写语句?
adodataset1.CommandText:='select * from 员工考勤表 where 编号='+Edit1.Text+'';
ADODataSet1.Active:=true;以上是我以编号为对象进行的记录搜索,如果改为以当前时间为对象进行记录搜索该怎么写语句?
解决方案 »
- 简单的问题---用SQLConnection 连接SQL Server 2000 时出现错误"unable to load libmysql.dll"???
- 怎样通过delphi程序给win2000 or xp添加用户?
- ComboBox.items.addobject?? 急急
- 一个小问题
- 高分求udp实现文件传送的例程,立刻给分。
- 大家谈一下开发多层分布体系的经验吧,来者有分,另有高分相赠
- 关于多线程查询!!
- 数据库设计的转移
- WORD型整形怎么以2个字节放入内存流中?
- 各位高手请帮我看看这样为什么会出错!
- 怎样调用远程方法?
- 怎么判断delphi中已经有一个excelappliction已经存在
数据库中也有GetDate()等函数。
strSQL := 'select * from 员工考勤表 where 建表时间='''+FormatDateTime(Date(),'yyyy-mm-dd')+'''';
access
strSQL := 'select * from 员工考勤表 where 建表时间=#'+FormatDateTime(Date(),'yyyy-mm-dd')+'#';