你就用ODBC或ADO去连接原来的数据源。然后用DELPHI去写一个功能增强后的模块,再用ShellExecute去调用原来VFP的程序。这样不要用户重复输入数据
。也达到升级的功能。

解决方案 »

  1.   

    ShellExecute是API函数,需要uses ShellAPI;
    ShellExecute(0, 'open', 'notepad.exe', nil, nil, SW_SHOW);
      

  2.   

    也就是说,在你新加的模块里面,添加一个按钮,让用户可以直接就去调用原来写的VFP的程序了,好象就是把两个程序并到一块来了,但其实还是两个独立的程序!
      

  3.   

    DDE调用函数,要求调用的文件必须是在系统中注册过的文件!·
      

  4.   

    ShellExecute   
    Open A Doc In The Right Program 
    Product:Delphi all versions 
    Uploader: Brian Pedersen     Company: ALTA A/S 
    Question/Problem/Abstract:
    Ever wanted to open a .doc in Word? Or a .htm in Internet Explorer? Then you should use ShellExecute:  
    Answer:    HINSTANCE ShellExecute( 
        HWND hwnd, 
          // Handle to parent window, usually self.Handle 
        LPCTSTR lpOperation, 
          // pointer to string that specifies operation to perform 
          // Possible values are: 
          // 'open'   : Open File 
          // 'print'  : Print file 
          // 'explore': The function explores the 
          //            folder specified by lpFile. 
        LPCTSTR lpFile, 
          // pointer to filename or folder name string 
        LPCTSTR lpParameters, 
          // pointer to string that specifies executable-file parameters 
        LPCTSTR lpDirectory, 
          // pointer to string that specifies default directory 
        INT nShowCmd 
          // whether file is shown when opened. You have a lot of options. 
          // Among them are: 
          // SW_HIDE, SW_SHOWDEFAULT, SW_SHOWMINIMIZED and so on... 
       ); Ready-To-Use function: This function simplifies the use of ShellExecute, and is able to raise and exception depending on the error: uses 
      ShellApi; function ShellOpenFile( hWnd : HWND; AFileName, AParams, ADefaultDir : string ) : integer; 
    begin 
      result := shellapi.ShellExecute( hWnd, 'open', pChar( AFileName ), 
                                       pChar(AParams), 
                                       pChar(ADefaultDir), 
                                       SW_SHOWDEFAULT ); 
      case result of 
        0 : 
         raise Exception.Create( 'The operating system is out of memory or resources.' ); 
        ERROR_FILE_NOT_FOUND : 
          raise Exception.Create( 'The specified file was not found.' ); 
        ERROR_PATH_NOT_FOUND : 
          raise Exception.Create( 'The specified path was not found.' ); 
        ERROR_BAD_FORMAT : 
          raise Exception.Create( 'The .EXE file is invalid (non-Win32 .EXE or error ' + 
                                  'in .EXE image).' ); 
        SE_ERR_ACCESSDENIED : 
          raise Exception.Create( 'The operating system denied access to the specified file.' ); 
        SE_ERR_ASSOCINCOMPLETE : 
          raise Exception.Create( 'The filename association is incomplete or invalid.' ); 
        SE_ERR_DDEBUSY : 
          raise Exception.Create( 'The DDE transaction could not be completed because ' + 
                                  'other DDE transactions were being processed.' ); 
        SE_ERR_DDEFAIL : 
          raise Exception.Create( 'The DDE transaction failed.' ); 
        SE_ERR_DDETIMEOUT : 
          raise Exception.Create( 'The DDE transaction could not be completed because the ' + 
                                  'request timed out.' ); 
        SE_ERR_DLLNOTFOUND : 
          raise Exception.Create( 'The specified dynamic-link library was not found.' ); 
        SE_ERR_NOASSOC : 
          raise Exception.Create( 'There is no application associated with the given ' + 
                                  'filename extension.' ); 
        SE_ERR_OOM : 
          raise Exception.Create( 'There was not enough memory to complete the operation.' ); 
        SE_ERR_SHARE : 
          raise Exception.Create( 'A sharing violation occurred.' ); 
      else 
      end; 
    end; Usage: hWnd: Handle to owner window. Usually you would use self.Handle. AFileName: Name of file to be opened. AParams: Additional parameters. ADefaultDir: The default (working) directory. Examples // Opens applog.txt in the notepad: 
    ShellOpenFile( self.Handle, 'c:\applog.txt', '', '' ); // Opens the document in Word: 
    ShellOpenFile( self.Handle, 'mydoc.doc', '', '' ); // Opens a web page in the default browser: 
    ShellOpenFile( self.Handle, 'http://www.caos.dk', '', '' ); // Opens your default e-mail client 
    ShellOpenFile( self.Handle, 'mailto:[email protected]', '', '' );