Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
How to call stored procedure and oracle function from oscript?
S_Swaminathan_(maninfoadmin_-_(deleted))
I am trying to call stored procedure and function in oracle from oscript.I am able to call the stored procedure, but calling a function is giving me error. Can any body tell me what is the problem?here is the code.String one = "1"String two = "9"// below statement is to call stored procedure//String stmt = "BEGIN test123("+one+","+two+"); END;"// below statement is to call oracle function created by me.String stmt = "Select test12() as testing from doc_test;"connection = CAPI.AllocConnect( \CAPI.CT_ORACLE,\'abcserver',\'',\'username',\'password',\logFile, \errHandler, \0 )if ( IsError( connection ) )echo( 'There was an error connecting' )DumpErrorStack( errHandler )else// Fetch all the records from myTable// call the stored procedure or functionexecResult = CAPI.Exec( connection, stmt)endif ( IsError( execResult ) )echo( 'The select statement failed' )DumpErrorStack( errHandler )end
Find more posts tagged with
Comments
S_Swaminathan_(maninfoadmin_-_(deleted))
I found the problem.// below statement is to call oracle function created by me.String stmt = "Select test12() as testing from doc_test;"The above line should be modified as below.// below statement is to call oracle function created by me.String stmt = "Select test12 as testing from doc_test"It worked.