Forum Discussion

electric_Insura's avatar
electric_Insura
Contributor
13 years ago

Stored procedure with multiple columns in results

I am using a JDBC request step to call a stored procedure that takes 4 arguments.

The result set contains two columns when the stored procedure is run in SQL Server. The data in these columns is not the same as the arguments to the stored procedure.

Example:

StoredProcedure ('StreetAddress', 'Zip', 'DistancetoFireStation', 'DistancetoFireHydrant')


should return a two digit code and the name of a fire department.

When I run the stored procedure, I get one digit as my result. It is labeled "UpdateCount" in the response view.

I have another stored procedure that returns one column per execution. The JDBC request step works correctly in that case.

So my result set is not getting returned for the first stored procedure. Can I configure the JDBC request step to do this correctly?

4 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    hmm... are you sure the results from this store procedure are returned as a standard resultset and not as out parameters?

    regards,

    /Ole
    SmartBear Sweden
  • Good question - you should have seen me try to do this through Excel VBA yesterday. I didn't have any better luck.

    I'll send your question along to the database developer. It occurred to me last night that we have a Web application in-house that handles results from this stored procedure, so maybe that will shed some light as well.
  • The DBA here confirmed that the stored procedure that is causing the trouble does send its results as output parameters.

    Is there any way to work around this in SoapUI?
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hello,

    Currently the only way to do this is to use Groovy test step instead of JDBC test step.
    You need to manually create connection to the database, execute statement
    and do something with the results. For more info how to connect to the database
    and execute callable statement with output parameters from java check the
    following links:

    http://support.microsoft.com/kb/313100
    http://msdn.microsoft.com/en-us/library/ms378108.aspx

    Hope this helps.

    regrads!
    Predrag
    SmartBear