This is a migrated thread and some comments may be shown as answers.

MySQL database stored procedure issue.

1 Answer 19 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sasha
Top achievements
Rank 1
Sasha asked on 06 Feb 2017, 05:07 PM
I'm using  reporting in application to render a report view. The problem is, I use procedure to run my report. Only SUPER user(root) and user assigned as Definer of the procedure can be used to access database in my application's connection string. Otherwise, loading report results with an exception. But really need to be able to populate with any account connected to . Is there any way to achieve this? 

1 Answer, 1 is accepted

Sort by
0
Ivan Hristov
Telerik team
answered on 09 Feb 2017, 12:12 PM
Hi Sasha,

The report engine needs to use proper permissions in order to execute the stored procedure and these permissions are not in the engine's scope, because they are managed by the database security system. If your database sets restrictions on who can execute the stored procedure, the reporting engine must comply with these restrictions.

If you want to avoid entering the Super user or Definer's credentials in your application's config file, you can use encryption to protect them, as described here.
Another approach is to connect to database with code, providing SuperUser or Definer permissions and load the data into a DataSet, DataTable or just a list of business objects. Then in your report you can replace the SqlDataSource with an ObjectDataSource and feed it with that data. In this case the reporting engine will not have any connection to the database, making usage of connection string unnecessary.

If you have other questions, please do not hesitate to ask.

Regards,
Ivan Hristov
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Sasha
Top achievements
Rank 1
Answers by
Ivan Hristov
Telerik team
Share this question
or