现在编一小程序,要实现对数据表定时查看记录,显示记录,并把查看时间记录下来,问题是我怎么提取系统时间,用某个函数吗?还是用控件?定时器如何用?
希望各位大侠出招,谢谢!
希望各位大侠出招,谢谢!
解决方案 »
- C#开发的控件可不可以用于“Delphi”
- 截取TForm1当前画面
- Application的onactionexecute在什么时候会被触发!!!
- 关于Stringgrid的菜问题(我是初学者)
- 在线请教:如何分别备份,恢复数据库中不同表?谢谢!
- 我如何判断listview是否有值.
- listbox1int.items.indexof 中 indexof是什么意思??
- 当Delphi开发的数据库程序运行时..........
- 怎么在程序里设置 DBGrid1.Options.dgMultiSelect :=True; 呢?
- delphi中的错误处怎么使用(try...),最好有代码我注释
- 三层数据库DCOM服务器安装时需要运行什么
- 很急的问题!请大家来看看
TForm1 = class(TForm)
DataSource1: TDataSource;
Query1: TQuery;
Session1: TSession;
Panel1: TPanel;
Button1: TButton;
DBGrid1: TDBGrid;
StatusBar1: TStatusBar;
Button2: TButton;
Timer1: TTimer; procedure Form1Create(Sender: TObject); procedure button1click(sender:TObject); private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Form1Create(Sender: TObject);
begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('insert into country(查询时间)values');
query1.active:=true;
end;
procedure tform1.button1click(sender:tobject);begin
timer1.enabled:=true;query1.SQL.add('update country set 查询时间=timetostr(now)');
query1.SQL.add('select * from country');
query1.active:=true; end;
end.