delphi timer自动显示时间,

解决方案 »

  1.   

    panel1.caption := FormatDateTime('yyyy-mm-dd hh:mm:ss', Now);
      

  2.   

    写在系统空闲事件里
    创建时赋值
    Application.OnIdle(事件指针)   := YOURDLE  panel1.caption := FormatDateTime('yyyy-mm-dd hh:mm:ss', Now);PROCEDURE YOURDLE(Sender:   TObject;   var   Done:   Boolean) ;
    BEGIN
      panel1.caption := FormatDateTime('yyyy-mm-dd hh:mm:ss', Now);
    END;
        
      

  3.   

    wintergoes  我那个添加的还是会报错  
     with ASQLite3Query1 do
       begin
        close;
        sql.clear;
        sql.add('insert into student values(:id,:username,:telephone,:address,:state)');     //增加
        ASQLite3Query1.Params.ParamByName('id').Value:=strtoint(id_edit.Text);
        ASQLite3Query1.Params.ParamByName('username').Value:=username_edit.Text;
        ASQLite3Query1.Params.ParamByName('telephone').Value:=strtoint(phone_edit.Text);
        ASQLite3Query1.Params.ParamByName('address').Value:=address_edit.Text;
        ASQLite3Query1.Params.ParamByName('state').Value:=state_edit.Text;
        ExecSQL;
        showmessage(ASQLite3Query1.SQL.Text);
      end;可以创建,但是会报 access violation at address 0049AB84 in module 
      

  4.   


    语句没有问题,你看你的其他与ASQLite3Query1控件有关联的控件中的事件是不是有问题?把那些代码注释掉试一下~~
      

  5.   

    总共拉了4个控件,ASQLite3DB1, ASQLite3Table1,ASQLite3Query1,DataSource1 是不是这四个呢, 查找跟删除都可以的。