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

Dynamic DataSource

2 Answers 191 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 18 Oct 2017, 11:28 PM

Our solution supports both MySQL and SQL Server, the database engine is selected during installation. We are trying Telerik reports but have been stumped trying to figure out how to create a report that can support MySQL and SQL Server. 

The report should execute a stored routine in the selected database engine. We have found how to fill the report data source at design time using either a sqldataadapter or mysqldataadapter but how would we select the appropriate data adapter at run time?

 

Any help you could provide would be appreciated!

2 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 20 Oct 2017, 03:35 PM
Hello Matt,

The easiest approach to use in your solution would be to utilize named connection strings that Telerik Reporting can resolve, and provide the corresponding real connection string in the application configuration file (web.config or app.config). Thus, in the different cases (MySQL or other SQL Server) it would be necessary just to change the config file with what stands behind the named connection string.
If this approach is not applicable, I would refer you to the Changing connection string dynamically according to runtime data KB article that provides an alternative solution.

Regards,
Todor
Progress Telerik
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
0
Matt
Top achievements
Rank 1
answered on 23 Oct 2017, 01:57 PM

Ah ok thanks. We are also looking into using an object data source to figure out the correct system to connect to through a separate library. Either way I think we can take it from here.

Much appreciated. 

Tags
General Discussions
Asked by
Matt
Top achievements
Rank 1
Answers by
Todor
Telerik team
Matt
Top achievements
Rank 1
Share this question
or