of_Execute


pfcmain.pbl   >   pfc_n_tr   >   of_Execute   

Full name pfc_n_tr.of_Execute
Access public
Extend of long
Return value long
Prototype public function long of_Execute(string)

Name Datatype
No Data

Name Datatype
ll_rc long
ls_name string

public function long of_Execute (string as_sqlstatement);//////////////////////////////////////////////////////////////////////////////
//	Public Function:  of_Execute
//	Arguments:		as_sqlstatement:  the SQL statement to execute
//	Returns:			long - the SQLCode value after the SQL is executed
//								 -10	if there is no connection to the database.
//	Description:	Executes specified SQL
//////////////////////////////////////////////////////////////////////////////
//	Rev. History	Version
//						5.0   Initial version
//////////////////////////////////////////////////////////////////////////////
//	Copyright © 1996-1999 Sybase, Inc. and its subsidiaries.  All rights reserved.  Any distribution of the 
// PowerBuilder Foundation Classes (PFC) source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//////////////////////////////////////////////////////////////////////////////
long	ll_rc = -10
string	ls_name

if of_IsConnected() then
	
	// If SQLSpy is available, add to the history
	if IsValid (gnv_app) then
		if IsValid (gnv_app.inv_debug) then
			if IsValid (gnv_app.inv_debug.inv_sqlspy) then
				ls_name = this.is_Name
				if Len (ls_name) = 0 then
					ls_name = this.ClassName()
				end if
				// Note:  as_sqlstatement is passed by reference
				gnv_app.inv_debug.inv_sqlspy.of_SQLSyntax &
					("Dynamic SQL using " + ls_name, as_SQLStatement, true)
			end if 
		end if
	end if
	
	execute immediate :as_SQLStatement using this;
	ll_rc = this.SQLCode
	
end if

return ll_rc
end function

     
Name Owner
No Data

     
Name Owner
powerobject.classname powerobject
systemfunctions.isvalid systemfunctions
systemfunctions.len systemfunctions
pfc_n_tr.of_IsConnected pfc_n_tr
pfc_n_cst_sqlspy.of_sqlsyntax pfc_n_cst_sqlspy

     
Full name
demopfc

     
Name Scope
No Data