>************************************************************************ >* 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 >>
>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 >>