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:
01261110
Views:
18
>>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.

Henry and Boris:
- Using Boris's example, see the Project Info / Servers tab.
The description will show "YourVFPProjectName.MyClass".
- Set the Instancing to MultiUse for a web application.
- I once could SET STEP ON in a DLL, but that's not the normal behavior. So you will probably need to build this as an EXE in order to debug.
- Andy Rice
San Diego, CA
Previous
Reply
Map
View

Click here to load this message in the networking platform