by nageswaragunupudi » Fri May 08, 2009 11:33 am
I would be writing my code like this:
- Code: Select all Expand view
....
MsgInfo( Sp_Job5( EName, Job ) )
...
function Sp_Job5( Ename, Job )
static oCmd
local oParam
if oCmd == nil
oCmd:=CreateObject("ADODB.Command")
oCmd:ActiveConnection:=oCon
oCmd:CommandType:=adCmdStoredProc
oCmd:CommandText:="Sp_Job5"
oParam := oCmd:CreateParameter( "Ename", adVarChar, adParamInput, 25 )
oCmd:Parameters:Append( oParam )
oParam := oCmd:CreateParameter( "Job", adVarChar, adParamInput, 25 )
oCmd:Parameters:Append( oParam )
oparam :=oCmd:CreateParameter( "Jcode", adVarChar, adParamOutput,20 )
oCmd:Parameters:Append(oTest3)
endif
oCmd:Parameters( "Ename" ):Value := Trim( cName )
oCmd:Parameters( "Job" ):Value := Trim( cJob )
TRY
oCmd:Execute()
CATCH e
ShowSqlError( e )
END
Return oCmd:Parameters( "JCode" ):Value
Regards
G. N. Rao.
Hyderabad, India