on 10-09-2009 9:00 PM
I have a stored procedure in oracle that i'd like to call. If I set my query type to command and do this:
call ProcedureName('[Param.1]')
it works fine
When I invoke it through iCommand, it seems to insert a semicolon at the end, and then I get an invalid character error.
What is the right way to call the stored procedure? Should its type be command or something else?
Edited by: apnahas on Oct 9, 2009 10:00 PM
Hi,
As per MII best practices use icommand for any inserts, deletes and update queries.
Yes, you are right with the syntax for calling the SP
CALL Procedure_Name('[Param.1]')
make sure their is no semicolon at the end of statement.
Since your are combining all the data into one string make sure that you escape any single quote(') within the string from javascript else again the icommand will fail.
Just try clearing all the cache, cookies and offline temp data if changes are not reflected.
If you are still getting some error then please post the exact error your getting.
Hope this helps!!
Regards,
Adarsh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Code is:
cmdApp.setQueryTemplate("tempName");
var queryObj = cmdApp.getQueryObject();
queryObj.setParam(1,"NAHASAN;254,5,2008,1,2012,5");
cmdApp.executeCommand();
In query template editor:
As a Command Query
CALL PROC('[Param.1]')
In the query template editor, it works if I set Param.1 to NAHASAN;254,5,2008,1,2012,5
But not from javascript
Also:
In the Log it shows this:
ERROR Connector Error in command: CALL PROC(' NAHASAN;254,5,2008,1,2012,5');
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could be something in your javascript? Post some of your code and that will help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
7 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.