Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fat Client Help
Message
General information
Forum:
Visual FoxPro
Category:
West Wind Web Connection
Title:
Miscellaneous
Thread ID:
00645313
Message ID:
00645352
Views:
7
See reply at:

http://www.west-wind.com/wwThreads/Default.asp?MsgId=0NC09IJBO

+++ Rick ---

>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
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform