cancel
Showing results for 
Search instead for 
Did you mean: 

Retreival of data from view object

0 Kudos

Dear Experts,


We have a SOAP to JDBC synchronous scenario where the webservice will send an input which will be the Database request.
The Database call should retreive the record sets from database which will then be mapped to the webservice response.

The tricky part is Database has a View object instead of table. While trying to retreive data from the View object, the below error is thrown:

Unable to execute statement for table or stored procedure. 'SapInventory' (Structure 'Statement_SapInventory') due to com.microsoft.sqlserver.jdbc.SQLServerException: The request for procedure 'SapInventory' failed because 'SapInventory' is a view object.

Please let me know your inputs/suggestions for this issue.

Rgds,

prashanthi

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Kalva,

 

    Change the table/View permissions. May are unable to do a select with the JDBC adapter. I mean, you must allow the select statement in your DDBB object.

Regards

0 Kudos

Hi Can Bel,

In our case User is having all the necessary Permissions.

Rgds,

Prashanthi

Former Member
0 Kudos

It doesn't make sense, i have several JDBC adapters reading from views and tables on different servers, DDBB, etc and always this kind of error comes from the user's or DDBB permissions, check both, check if the View has the reading (Select) allowed.

Regards!

anand_shankar10
Active Participant
0 Kudos

Work the DBA and see that the similar query works on the database with some tools. ex: TOAD.

Regards

Anand

Former Member
0 Kudos

Yes, this is the idea, but they should use the same user assigned to the PI Adapter, in other case it doesn't make sense.

anand_shankar10
Active Participant
0 Kudos

True, it should be tested with same PI user