Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple html form controls to VFP table
Message
 
To
02/08/2000 20:06:25
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00399974
Message ID:
00400197
Views:
24
Oh man, where to start...

Alright how 'bout in the VFP COM object - if you are running IIS, you should have MTS available (you just may not know it).

Creating a VFP6 Com Object 101;

In VFP, create a new project named myvfpcom with a main program...

MAIN.PRG - Contents

DEFINE CLASS clsmain AS custom OLEPUBLIC

PROCEDURE ADD_DATA
PARAMETERS c1, c2
USE myTable IN 0 SHARED
****Insert the data however you want

USE IN myTable

RETURN 'Successful Update'
ENDPROC

ENDDEFINE

**Compile the project as a Com Server and place the files on your server.
**You will need the VFP runtime files, so create a setup with a dummy project and run it on the server to get the correct libraries installed.
**Create a new MTS Package and add the dll to the package

Now... In your ASP File... It sounds like you have an HTML FORM already, if so, create a new ASP file (the one in your FORM ACTION)

myVFPUpdatePage.ASP - Contents

>%@ Language=VBScript %>
>HTML>
>HEAD>
>META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
>/HEAD>
>BODY>
>%
Set oAppObject = Server.CreateObject("myvfpcom.clsmain")
lcc1=Request.Form("txtc1")
lcc2=Request.Form("txtc2")

IF isempty(lcProblemDesc) THEN lcc1 = ""
IF isempty(lcSolution) THEN lcc2 = ""

Response.Write(oAppObject.ADD_DATA(lcc1,lcc2))
Set oAppObject = NOTHING
%<


>/FONT>
>/BODY>
>/HTML>


I hope this can get you started... if not, just ask. BTW, the Less than's are changed in hopes this page will display.
Wayne Myers, MCSD
Senior Consultant
Forte' Incorporated
"The only things you can take to heaven are those which you give away" Author Unknown
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform