Reputation: 189
I am getting this error when I try to call procedure in mysql
[ERROR ] FWLSE0035E: Invocation of procedure 'StoredProcedure' failed. [project projectname] invalid type of element
in my stored procedure i am creating table dynamically,
When I try "Invoke Worklight Procedure"
from worklight studio it works well and create table, but when I run from webpage it gives me error
my calling procedure call is
WL.Server.invokeSQLStoredProcedure({
procedure : 'createUserFormTable',
parameters : ['table_name', ' (name VARCHAR(10), language VARCHAR(10));']
});
and in my SQL I tried both of these
CREATE PROCEDURE createUserFormTable(p_tbl VARCHAR(20), p_columns TEXT)
CREATE PROCEDURE createUserFormTable(p_tbl VARCHAR(20), p_columns VARCHAR(1000))
Note: It works and create table when I call from worklight studio.
Upvotes: 0
Views: 179
Reputation: 189
I am able to resolve by adding .toString() in the 2nd parameter I was creating variable in javasript like var param2 = ""; and then concat but surprisingly adapter was not considering it as a string, when I added param2.toString() in the end it worked well.
Upvotes: 2