This is a more general question, I am building a report generator:
public ReportGenerator(IReportGeneratorConfig config)
{
Configuration = config;
ImagePaths = new Dictionary<string, string>();
ReportErrors = new StringBuilder();
DatabaseForReportQueries = DatabaseFactory.CreateDatabase(Configuration.DatabaseName);
using (System.Data.Common.DbConnection conn = DatabaseForReportQueries.CreateConnection())
{
ReportConnectionString = conn.ConnectionString + "Provider=SQLOLEDB;";
conn.Close();
}
}
This is the error message that I get when I try to run the report button
Cannot open data source, please check ConnectionString and RecordSource properties.
ConnectionString: Database=Test80;Server=SQL01;uid=mcadmin;pwd=password;Provider=SQLOLEDB;
RecordSource:
All information is not corrupted separately from the Provider, which I send to my code. I do not know how to find out the name of the provider in the web application. This is not the same as tag providerNamein connectionStrings.config. It should beProvider=something;
The connection string has providerName = System.Data.SqlClient
source
share