of_sqlsyntax


pfcutil.pbl   >   pfc_n_cst_sqlspy   >   of_sqlsyntax   

Full name pfc_n_cst_sqlspy.of_sqlsyntax
Access public
Extend of integer
Return value integer
Prototype public function integer of_sqlsyntax(string,ref string,boolean)

Name Datatype
No Data

Name Datatype
li_null integer
li_rc integer

public function integer of_sqlsyntax (string as_heading, ref string as_syntax, boolean ab_oktopause);//////////////////////////////////////////////////////////////////////////////
//
//	Function: 		of_SQLSyntax
//
//	Access:  		public
//
//	Arguments:
//	as_heading		Heading (if any) for the SQLSyntax
//	as_syntax		The actual SQLSyntax by Reference
//	ab_oktopause	A boolean stating if this SQLSyntax can be paused
//						for user interaction on the SQLSpy window.
//
//	Returns:  		integer
//						0 if it succeeds and the caller's processing should 
//							continue as normal.
//						1 if it suceeds but the caller's proccessing should stop.
//						2 if it succeeds but the caller's processing should skip 
//							this request and execute the next request (if any).
//						-1 if an error occurs.
//						If any argument's value is NULL, function returns NULL.
//
//	Description:  	SQL Syntax to be processed by SQLSpy.
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	5.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
//	Copyright © 1996-1997 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.
//
//////////////////////////////////////////////////////////////////////////////

integer li_rc

//check parameters
If IsNull(as_heading) or IsNull(as_syntax) or IsNull(ab_oktopause) Then
	integer li_null
	SetNull (li_null)
	Return li_null
End If

//Check if the syntax was marked as OKToPause.
//Check if the user wants to stop all pausable SQL.
//If both are True then allow the user to change the SQL
//prior to adding it to the history.
If ab_oktopause and ib_batchmode=False Then

	//Prepare information for the SQLSpyInspect window.
	of_SetCurrentHeading(as_heading)
	of_SetCurrentSyntax(as_syntax)

	//Perform the inspect functionality
	li_rc = of_OpenSQLSpyInspect()

	If li_rc = 0 Then 
		//Take the syntax that may have been modified by the user
		as_heading = of_GetCurrentHeading()
		as_syntax = of_GetCurrentSyntax()
	ElseIf li_rc > 0 Then
		//The user either clicked on Cancel or CancelAll button
		as_heading = ''
		as_syntax = ''
	End If

Else
	//By default processing should continue as normal.
	li_rc = 0
End If

//Update the history components.
If li_rc = 0 Then
 	of_addtohistory (as_heading, as_syntax)
End If

Return li_rc

end function

     
Name Owner
pfc_n_tr.of_Execute pfc_n_tr
pfc_n_cst_sqlspy.of_sqlsyntax pfc_n_cst_sqlspy
pfc_n_cst_sqlspy.of_sqlsyntax pfc_n_cst_sqlspy
pfc_n_cst_sqlspy.of_sqlpreview pfc_n_cst_sqlspy

     
Name Owner
systemfunctions.isnull systemfunctions
systemfunctions.setnull systemfunctions
pfc_n_cst_sqlspy.of_SetCurrentSyntax pfc_n_cst_sqlspy
pfc_n_cst_sqlspy.of_addtohistory pfc_n_cst_sqlspy
pfc_n_cst_sqlspy.of_GetCurrentHeading pfc_n_cst_sqlspy
pfc_n_cst_sqlspy.of_GetCurrentSyntax pfc_n_cst_sqlspy
pfc_n_cst_sqlspy.of_SetCurrentHeading pfc_n_cst_sqlspy
pfc_n_cst_sqlspy.of_opensqlspyinspect pfc_n_cst_sqlspy

     
Full name
No Data

     
Name Scope
No Data