谢谢,有点小急,在客户那里

解决方案 »

  1.   

    ??神马情况??
    LZ是说自己写的exe timer没运行?
    理论上不会出现的
    检查你的原代码,重新编译
      

  2.   

    客户神马系统,你的timer都做什么操作?
    可能是运行了,但是操作被杀毒或者系统禁止了
    vista以上尝试使用管理员权限运行exe,或者看看关掉360
      

  3.   

    Timer和安没安装DELPHI7 有啥个关系? 多半是进程整个被停掉了。
      

  4.   

    程序里的timer事件不再被触发?
    还是触发了但因为条件不同,没执行有效果的事情?
      

  5.   

    谢谢大家这么快回答我。后边设了一些点,发现不是timer的问题,现在贴出代码A部分代码:
    Str_Sql := 'select top 1  * from t_Mails where ToAddr =:ToAddr and ReaderFlag=1  and ' ;
    Str_Sql := Str_Sql +  ' MailID   in ( select top 5 MailID from t_Mails where ToAddr =:ToAddr_2 order by SenderDate desc) order by SenderDate desc  ';
    Query_PopMail.Connection := DM.CONN;
    Query_PopMail.Close;
    Query_PopMail.SQL.Clear;
    Query_PopMail.SQL.Add(Str_Sql);
    Query_PopMail.Parameters.ParamByName('ToAddr').Value := GetComptName + '|'  + GetIP;
    Query_PopMail.Parameters.ParamByName('ToAddr_2').Value := GetComptName + '|'  + GetIP;sql2000 跟踪器显示:
    exec sp_executesql N'select top 1  * from t_Mails where ToAddr =@P1 and ReaderFlag=1  and  MailID   in ( select top 5 MailID from t_Mails where ToAddr =@P2 order by SenderDate desc) order by SenderDate desc  
    ', N'@P1 varchar(19),@P2 varchar(19)', '统计室|202.202.202.', '统计室|202.202.202.'
    B部分代码:
    Query_MailList.Connection :=  DM.CONN;
    Query_MailList.Close;
    Query_MailList.SQL.Clear;
    Query_MailList.SQL.Add('select top 10 * from t_Mails where ToAddr =:ToAddr order by SenderDate desc');
    Query_MailList.Parameters.ParamByName('ToAddr').Value := GetComptName + '|'  + GetIP;
    Query_MailList.Open;
    sql2000 跟踪器显示:
    exec sp_executesql N'select top 10 * from t_Mails where ToAddr =@P1 order by SenderDate desc
    ', N'@P1 varchar(255)', '统计室|202.202.202.234'
    在我自己机器上,包括客户那里装delphi的机器都没有问题。 没有装delphi的机器就出问题了。 ParamByName('ToAddr_2').Value := GetComptName + '|'  + GetIP;'统计室|202.202.202.'
      

  6.   

    IP地址最后一段,  ParamByName('ToAddr_2').Value  给截掉了,不知道为什么?
      

  7.   

    但是我只有一个参数的时候是正常的
    ParamByName('ToAddr').Value := GetComptName + '|' + GetIP;
    SQL跟踪器
    '统计室|202.202.202.234'
    但是2个参数的时候
    Query_PopMail.Parameters.ParamByName('ToAddr').Value := GetComptName + '|' + GetIP;
    Query_PopMail.Parameters.ParamByName('ToAddr_2').Value := GetComptName + '|' + GetIP;
    '统计室|202.202.202.', '统计室|202.202.202.'就变成这样了,如果是版本不对,一个参数的时候也应该有问题
      

  8.   

    是不是OnTimer运行时间太长了,乱了?
      

  9.   


    参数名不要使用下划线,会不会就没问题了?没怎么使用过参数方式,都是直接拼凑sql的。。
      

  10.   

    一个参数时:N'@P1 varchar(255)', '统计室|202.202.202.234'
    2个参数时:N'@P1 varchar(19)', '统计室|202.202.202.'
    参数的长度信息 自动 变短了?!
      

  11.   

    看你数据中对应字段的长度,是不是长度设置有问题。 看你系统是不是一样,32位64位置? 看看getip 处理中去掉的是什么字符串,是不是也丢数据了。最后去掉那些参数传递,我感觉用参数既麻烦又容易出问题,拼串多干脆,调试也容易show一个什么到看到了