wwsql::ExecuteStoredProcedure

Executes a Stored Procedure on the Remote Server. Note that you have call AddParameter() for every parameter before calling this method.
o.ExecuteStoredProcedure(lcProcedure,llNoCursorReturned)              

Return Value

.T. or .F.

Parameters

lcProcedure

llNoCursorReturned
Set this parameter to .T. if the stored procedure does not return a cursor result but returns any OUT parameters.

This option is required for ADO operation only to let ADO know to retrieve any parameter, but you should always set it for compatibility even when now use wwADOSql.

Example

llAdo = .f. IF llADO oSql = CREATEOBJECT("wwADOSql") oSQL.nCodepage=65001 ? oSQL.Connect("Provider=sqloledb;Data Source=(local);Initial Catalog=WebStore;Integrated Security=SSPI") ELSE oSql = CREATEOBJECT("wwSql") ? oSQL.Connect("driver={sql server};server=(local);database=WebStore") ENDIF pnId=-1 pcTable = "wws_tlineitems" oSQL.AddParameter("wws_tlineitems","pcTable") oSQL.AddParameter(0,"pnId","OUT") IF !oSQL.ExecuteStoredprocedure("sp_ww_newId") ? oSQL.cErrorMsg RETURN ENDIF *** Grab the return value ? oSQL.oParameters["pnId"].Value

See also:

Class wwsql


  Last Updated: 04/29/08 | © West Wind Technologies, 1996-2010