************************************************************************ * 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 ) ENDFUNCwhere ContStatus is my Process Class that I created to open the table InvCont.
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 BROWSEUnfortunately this does not work and I get a Method Not Allowed message.