cancel
Showing results for 
Search instead for 
Did you mean: 

SQL temporary table from stored procedure does not works in VC

Former Member
0 Kudos

Hi everybody,

I have a stored procedure that send me back the content of a sql temporary table (#TABLETMP) as result.

The stored procedure works when I execute it on my sql browser, but when I test it on VC, nothing happened, not even a empty result.

So I tried to declare variable with a "table" type (declare @TABLETMP table (col1 int, col2 int) : same problem, it works with my sql browser but not in VC.

So I tried to create a real table at the beginning of the procedure and to drop it at the end, but same problem again.

The only way I found is to create one procedure that creates a table and one other that displays the content and drops it. But I can't call the first procedure in the second and execute only the second in VC.

I have to execute both separately in visual composer. I would really like to understand what is the problem, because creation of a real table causes some problems when different users use the procedure at the same time...

Can somebody help me please ???

Regards

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Returning (or sending in) multiple rows directly from (or to) a stored procedure is not currently possible. I have been in contact with SAP on this subject earlier, and they suggest using a web service to do the job. I used this as a work around, calling the stored procedure from a web service. I send in VC tables to this web service, and this in turn contacts my stored procedure.

The problem is related to the connector framework in the J2EE environment.

I am on 7.0 sps 17

If you use stored procedure single value parameters of type varchar, number ... then VC has no problem communicating with your procedures.

Good luck

Henning Strand

Former Member
0 Kudos

Ok, thank you for your answer.

natalie_zhang3
Explorer
0 Kudos

Why the select statement from normal table returns the resultset, but the select statement from temporary table returns nothing?