A URL on the server that's running the wwHTTPSQLServer component to process client requests.
o.cServerUrl
Remarks
Only used when nDataMode = 4 (Web Data Source).
Example
CLOSE ALL
DO WCONNECT
SET CLASSLIB TO WWDEVELOPER ADDIT
oDev = CREATEOBJECT("cDeveloper")
oDev.nDataMode = 4
oDev.cServerUrl = "http://localhost/wconnect/wc.dll?http~HTTPSQL"
* ** To configure call Open() then access the oHTTPSQL object directly
* ** wwHTTPSQL is subclassed from wwHTTP
oDev.Open()
* oDev.oHTTPSQL.cUsername = "rick"
* oDev.oHTTPSQL.cPassword = "keepguessingbuddy"
oDev.oHTTPSQL.nConnectTimeout = 40
oDev.Query() && Retrieve all records
BROWSE
* ** Load one object
oDev.Load(8)
? oDev.oData.Company
? oDev.oData.Name
oDev.oData.Company = "West Wind Technologies"
oDev.Save()
* ** Create a new entry
? oDev.New()
loData = oDev.oData
loData.Company = "TEST COMPANY"
loData.Name = "Rick Sttrahl"
oDev.Save()
oDev.Execute("select * from wwDevRegistry where company like 'W%'")
BROWSE
RETURN
Server Side Code
FUNCTION HTTPSQL()
* ** Create Data Object and call Server Side Execute method (wrapper for Process Method)
SET PROCEDURE TO wwHTTPSQLServer ADDITIVE
loData = CREATE("wwHTTPSQLServer")
loData.cAllowedCommands = "select,execute,insert,update"
* ** This can be done with Server.oDeveloperSql to persist connections
* ** for much faster response times
oSQL = CREATEOBJECT("wwSQL")
oSQL.cConnectString = "server=(local);driver={SQL Server};database=wwDeveloper;pwd=sa;uid=;"
loData.oSQL = oSQL &&Server.owwDevSql
loData.cRequestXML = Request.FormXML()
loData.S_Execute()
* ** Return the result XML response
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
* HTTP :: HTTPSQL
See also:
Class wwBusinessObject© West Wind Technologies, 2023 • Updated: 02/17/19
Comment or report problem with topic