of_sqlpreviewtype


pfcapsrv.pbl   >   pfc_n_cst_conversion   >   of_sqlpreviewtype   

Full name pfc_n_cst_conversion.of_sqlpreviewtype
Access public
Extend of integer
Return value integer
Prototype public function integer of_sqlpreviewtype(string,ref sqlpreviewtype)

Name Datatype
No Data

Name Datatype
li_null Integer

public function integer of_sqlpreviewtype (string as_source, ref sqlpreviewtype a_sqlpreviewtype);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		of_SQLPreviewType
//
//	Access:  		public
//
//	Arguments:
//	as_source			The string value to be converted to SQLPreviewType
//							datatype value.
//	a_sqlpreviewtype	A SQLPreviewType variable passed by reference which will
//							hold the SQLPreviewType value that the string value was
//							converted to.
//
//	Returns: 		integer	 
//						1 if a successful conversion was made.
//						If as_source value is NULL, function returns NULL.
//						If as_source value is Invalid, function returns -1.
//
//	Description:  Converts a string value to a SQLPreviewType data type value.
//
//////////////////////////////////////////////////////////////////////////////
//
//	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.
//
//////////////////////////////////////////////////////////////////////////////

//Check parameters
If IsNull(as_source) Then
	Integer li_null
	SetNull(li_null)
	Return li_null
End If

//Convert to lowercase
as_source = Lower (as_source)

If Pos (as_source, "insert") > 0 Then
	a_sqlpreviewtype = PreviewInsert!
	Return 1
ElseIf Pos (as_source, "delete") > 0 Then
	a_sqlpreviewtype = PreviewDelete!
	Return 1
ElseIf Pos (as_source, "update") > 0 Then
	a_sqlpreviewtype = PreviewUpdate!
	Return 1
ElseIf Pos (as_source, "retrieve") > 0 or &
		Pos (as_source, "select") > 0 Then
	a_sqlpreviewtype = PreviewSelect!
	Return 1
End If

//Invalid parameter.
Return -1

end function

     
Name Owner
No Data

     
Name Owner
systemfunctions.isnull systemfunctions
systemfunctions.lower systemfunctions
systemfunctions.pos systemfunctions
systemfunctions.setnull systemfunctions

     
Full name
No Data

     
Name Scope
No Data