I am currently working on a case where we do not want to change much in the C # / wpf program, but would like to add a function. We currently allow certain users to add SQL queries to the database to retrieve client data, so you must specify a custom connection string / provider name. Using this information, you can create a connection and retrieve data using C #.
However, we would like to add the ability to allow this user group to also request XML files with a specific connection / provider string. I was just looking for opportunities in .net to do this, but can't find a decent way ... Is something like that possible? (Perhaps OLEDB / ODBC)?
edit: For clarity, I would like to state that the solution should be able to fit into the data source connection template with the specified connection string with the specified provider and execute an SQL query.
edit2: Having examined the first three answers, I decided to look beyond XML. This post seems to illustrate the above case in the best way (the only difference is that instead of XLS it is used instead of XML): How to request an excel file in C # with a detailed request . Possible XML solutions are still welcome, however ...
Thanks in advance.
source
share