Returns a named parameter that was sent in as an output parameter in AddSQLParameter.
o.GetSQLReturnValue(lcVarName)
Parameters
lcVarName
Example
oHSQL = CREATEOBJECT("wwHTTPSQL")
oHSQL.cServerUrl = "http://localhost/wconnect/wc.dll?http~httpsql"
oHSQL.cSQLCursor = "TDevelopers"
lnCount = oHSQL.Execute("select * from wwDevRegistry")
? lnCount
IF oHSQL.lError
? oHSQL.cErrorMsg
ELSE
BROWSE
ENDIF
*** Web Connection Handler Method
* wwMywwProcess::HTTPSQL
FUNCTION HTTPSQL()
*** Check for validation here
*IF !THIS.Login()
* RETURN
*ENDIF
*** Create Data Object and call Server Side Execute method (wrapper for Process Method)
SET PROCEDURE TO wwHTTPSQLServer ADDITIVE
*** You can limit allowed commands here
loData.cAllowedCommands = "select,execute,insert,update,delete,method,"
*** Create SQL Connection to use for this handler
oSQL = CREATEOBJECT("wwSQL")
oSQL.cConnectString = "server=(local);driver={SQL Server};database=wwDeveloper;pwd=sa;uid=;"
loData.oSQL = oSQL
*** Alternately recycle a persistent SQL connection
*loData.oSQL = Server.owwDevSQL
*** Pass XML POST data to the SQL handler
loData.S_Execute(Request.FormXML())
*** Create the response (XML)
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 wwHTTPSQL© West Wind Technologies, 1996-2024 • Updated: 04/03/18
Comment or report problem with topic