请问如何调用帮助文件,比如
form1.n1click;
begin
此处如何写
end
还有我用adoq.sql.text:='select * from emp where id='+eid.text+' and name='+ename.text;查询怎么不行啊,请指教

解决方案 »

  1.   

    对于第二个问题:
    adoq.sql.text:='select * from emp ';
    adoq.sql.text :='where id='+eid.text+' and name='+ename.text';
      

  2.   

    1.  你可以用,shellexcute()函数
    2.  adoq.sql.text:='select * from emp ';
    adoq.sql.text :='where id='+eid.text+' and name='''+ename.text+'''';
      

  3.   

    调用外部程序,你可以用API函数拉
      

  4.   

    你可以用,shellexcute()函数adoq.sql.add('select * from emp ');
    adoq.sql.add('where id='+eid.text+' and name='''+ename.text+'''');
      

  5.   

    你可以用,shellexcute()函数adoq.sql.add('select * from emp ');
    adoq.sql.add('where id='''+eid.text+''' and name='''+ename.text+'''');
    只要用到条件的时候是不是都得用两个单引号
      

  6.   

    调用帮助文件
    ShellExecute(handle, "open", 'myhelp.chm', Nil, Nil, SW_SHOWNORMAL); 
    Winexec('hh.exe '+Path+'myhelp.chm',sw_normal);
      

  7.   

    adoq.sql.text:='select * from emp where id='+QuotedStr(eid.text)+' and name='+QuotedStr(ename.text)
      

  8.   

    1.
    if FileExists('help.hlp') then
       begin
         Application.HelpFile :='help.hlp';
         Application.HelpCommand(HELP_FINDER, 0);
       end
      else
        Application.MessageBox('帮助文件不存在!','信息提示',mb_iconError+mb_OK);
    2.
    adoq.sql.add('select * from emp ');
    adoq.sql.add('where id='''+eid.text+''' and name='''+ename.text+'''');2.
      

  9.   

    uses
      ShellApi
    begin
      ShellExecute(handle, 'open', '帮助文件.chm', Nil, Nil, SW_SHOWNORMAL);endsql.add('select * from emp where id='''+eid.text+''' and name='''+ename.text+'''');
      

  10.   

    uses
      ShellApi
    begin
      ShellExecute(handle, 'open', '帮助文件.chm', Nil, Nil, SW_SHOWNORMAL);
    endsql.add('select * from emp where id='''+eid.text+''' and name='''+ename.text+'''');
      

  11.   

    1.  你可以用,shellexcute()函数
    2.  adoq.sql.text:='select * from emp ';
    adoq.sql.add('where id='+eid.text+' and name='''+ename.text+'''');
      

  12.   

    如果你是用help workshop编辑的帮助文件的话,可以用delphi自身的机制运行你的帮助文件。
    “project-->Options-->Application-->help file: ”浏览到你的帮助文件,并在程序加入相应帮助菜单(myhelp)。procedure  Tform1.myhelpClick(Sender:TObject)  begin
         Application.helpCommand(HELP_CONTENTS,0)
      end;另外
    借用“qingenerp(真爱不息)” 的发言:
    uses
      ShellApi
    begin
      ShellExecute(handle, 'open', '帮助文件.chm', Nil, Nil, SW_SHOWNORMAL);
    endsql.add('select * from emp where id='''+eid.text+''' and name='''+ename.text+'''');