Visual Studio 2005 (VB) - Calling FoxPro Program
Posted on 2014-12-12
OK so this works fin on my laptop because I have FoxPro installed...but does NOT work on a PC that doesn't have FoxPro installed.
I thought that when I added the reference to FoxPro and it loaded this file (Interop.VisualFoxpro.dll) to my Debug Director as long as that file was present in the application directory on the PC without FoxPro it would use this dll for any and all FoxPro commands.
I'm trying to execute a report from my Visual Basic program and as I mentioned it works fine on my laptop it is when I load (copy) everything down to the PC without FoxPro install it doesn't work...I get Retrieving the COM Class factory for component...etc.
Here is my code:
Dim FoxPro As New VisualFoxpro.FoxApplication
FoxPro.DefaultFilePath = sSitePath & "Programs\"
FoxPro.DoCmd("DO " & sSitePath & "Programs\r_ach_items.prg WITH 'sOutFile & "'