Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running a VFP app without and window flash
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01260568
Message ID:
01261087
Views:
18
>Thanks for the suggestion. I already tried the CONFIG file solution, to no avail. When the CGI sccript calls the FoxPro executable, there's still a flash, whether we run it from the HTML page or, as a test, from the DOS command line.
>
>I also already got the suggestion to implement a COM server, but I've never done this and don't know how to proceed. All I know is the general advice to make my program into a method, and then to use the following sample:
>
> oVFPObject = CREATEOBJECT("MyCOMLibrary".MyCOMCLass")
> oVFPObject.DoMyMEthod(< parameter list>)
> RELEASE oVFPObject
>
>The problem is, I have neither a class or a library, so at this point I'm stuck. I'd be really grateful if you (or anyone else) could give me a push in the right direction. I appreciate the help.
>
>
>Henry

I have no idea what your code should do. But basically you could do that in class, no matter Visual (stored in VCX library) or not (defined in some PRG).
So, if you want to open some table do something with it, you could do this:
*** VFP side:

DEFINE CLASS MyClass AS Session OLEPUBLIC
      
       PROCEDURE InsertRecord(lnFld1 as integer, lcFld2 as string) as void
            INSERT INTO MyTable VALUES (lnFld1, lcFld2)
       ENDPROC

       PROCEDURE DeleteRecord(lnPK as integer) as VOID
          DELETE FROM MyTable WHERE MyTable.PK = m.lnPK
       ENDPROC
ENDDEFINE
Keep in mind that here I didn't put any Error handling and testig.
*** External ASP/Other application
oVFP = CREATEOBJECT([YourVFPProjectName.MyClass) && Or the appropriate syntax
oVFP.InsertRecord(1,[asdasdasdas])
oVFP.DeleteRecord(1)
Then you should compile the project as desired COM server. If you want to have User Interface you must compile the project as EXE, if you don't have such interface you could build it as DLL.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform