Hello,
I have some stored procedure at Microsoft SQL Server, it returns a view ('myview') based on parameters passed:
The stored procedure ('requserinfo') has 3 parameters: @fname; @lname;@locationcode .....
I want to use the procedure to get a user information in the form (something like: FirstName, LastName, Age, Location etc). It is going to be some kind of a search form... I don't have an access to the data source, only can execute the procedure so this is only the way to get the user information....
My current solution is to use MS SQL connector to get the data into the process variable (java.util.List) and then use it in the form to display the table. I tested the query syntax to call a stored procedure with MSSQL Server. Something like:
EXEC [myview].[requserinfo] @fname = N'JOHN',@lname = N'DOE',@locationcode = N'12345';
In the MSSQL query console it works just fine and returns me the data I want.
I have my server/user/password to use it as a connection string, so this should not be a problem.
I use following query in my connector (both versions returns same result):
Version-1:
DECLARE @return_value int
EXEC @return_value = [myview].[requserinfo]
@prenom = N'JOHN',
@nom = N'DOE',
@etab = N'12345'
SELECT 'Return Value' = @return_value
Version-2:
EXEC [myview].[requserinfo] @fname = N'JOHN',@lname = N'DOE',@locationcode = N'12345';
My OUTPUT operations ('Takes value of') suppose to parse the resultset into a process variable (type: java.util.List).
So now, when I try to use it in the connector I receive nothing (null as a result). :(
Checking the error message I can see that my query string returns nothing:
java.lang.NullPointerException: Cannot invoke method getMetaData() on null object
Any thoughts & suggestions on how to use stored procedures with the connectors are welcome!
Thank you!