Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fat Client Help
Message
From
16/04/2002 03:28:39
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
West Wind Web Connection
Title:
Fat Client Help
Miscellaneous
Thread ID:
00645313
Message ID:
00645313
Views:
26
Hi
I am trying to set up Fat Client using VFP instead of SQL Server.

I assume I have to create a ODBC connection to do this.

Could someone please advise me what would be the cConnectString for this (as per the demo example) for a ODBC User Connection called WotsFox which opens a database called 'Wots'.

I am wanting to access a table called InvCont.

Here is the example server code after I modified it
************************************************************************
* HTTP :: HTTPSQL
****************************************
FUNCTION HTTPSQL_wwWotsCont()
*
*
* Add open of WOTS DATABASE and Contractors Tables here???
*
*** Create Data Object and call Server Side Execute method (wrapper for Process Method)
SET PROCEDURE TO wwHTTPSQLServer ADDITIVE
loData = CREATE("wwHTTPSQLServer")
loData.cConnectString = "server=(local);driver={WotsFox};database=ContStatus;pwd=sa;uid=;"
loData.cAllowedCommands = "select,execute,insert,update,delete,method,"

*** Retrieve XML input and then try to execute the SQL
loData.S_Execute(Request.FormXML())   

*** Send the output back to the client
loHeader = CREATEOBJECT("wwHTTPHeader")
loHeader.SetProtocol()
loHeader.SetContentType("text/xml")
loHeader.AddForceReload()
loHeader.AddHeader("Content-length",TRANSFORM(LEN(loData.cResponseXML)))
Response.Write( loHeader.GetOutput() )

Response.Write( loData.cResponseXML )
ENDFUNC
where ContStatus is my Process Class that I created to open the table InvCont.

on the client side I have the following
DO WCONNECT
SET CLASSLIB TO wwWotsWeb Additive
SET PROCEDURE TO wwHTTPSQL Additive

oDev = CREATEOBJECT("ContStatus")
oDev.nDataMode = 4
oDev.cServerUrl = "http://localhost/wconnect/wc.dll?http~HTTPSQL_wwWotsCont"

*** Sets up the HTTP object so we can configure it (optional)
oDev.Open()
oDev.oHTTPSQL.nConnectTimeout = 40

? oDev.Query()   && Retrieve all records
? oDev.cErrorMsg

BROWSE
Unfortunately this does not work and I get a Method Not Allowed message.

Perhaps I have misunderstood things somewhat.

Regards
Geoff Scott
May all your weeds be wildflowers
Next
Reply
Map
View

Click here to load this message in the networking platform