我需要执行的是MYSQL数据库中的MYSQLDUMP的数据库备份命令
请大家帮个忙!
我要实现的是如下命令
mysqldump heidunlog>d:\900\sampl1
请问以上语句如何再shellexecute中得到执行?

解决方案 »

  1.   

    http://www.delphiboy.com/cgi-bin/doc/datacontent.php?no=379uses ShellApi;
    ...
    ShellExecute(Handle, ’open’,
      'mysqldump', 'heidunlog>d:\900\sampl1', nil, SW_SHOWNORMAL);
      

  2.   

    to  aiirii(ari-爱的眼睛) 
    我执行了。可是仍然无法实现呀,
      

  3.   

    mysqldump的环境变量语句有没有设置??
    改成绝对路径试试。
      

  4.   

    注意要执行文件的路径要写全。
    function ExeTempFile(s:string):integer;
    var
      ShellExecInfo: TShellExecuteInfo;
    begin
      if s<> '' then
      begin
        {initialize params}
        ZeroMemory(@ShellExecInfo, SizeOf(TShellExecuteInfo));
        with ShellExecInfo do
        begin
          cbSize := SizeOf(TShellExecuteInfo);
          Wnd := 0;
          lpFile := PChar(s);
          nShow:=SW_SHOW;
        end;
      ShellExecuteEx(@ShellExecInfo);
      end;
    result:=0;
    end;
      

  5.   

    帮你实验,
     getit911(Windows转Linux中) ( ) 信誉:98 
    的方法我都通过了