Synfusion Version:
I am referring to this blog post on connecting directly to sql server to get data to export to excel, specifically as follow.
I tried following:
- replace with my connection as follow with both Windows Authentication and username/password
- replace Database label with Initial Catalog
- trying to connect to cloud SQL Server and try replace with azure sql connection
I have checked that i am able to connect with the similar connection string via System.Data.SqlClient in my application but not through IConnectionString here
All of it return me error "Invalid Connection String".
What is the correct connection string needed or what else I am missing?
"Server=localhost;Database=TestDB;User Id=myUsername;Password=myPassword";
"Server=localhost;Database=TestDB;Integrated Security=True";
string connectionString = "Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password = myPassword";
string query = "SELECT * FROM Employees";
IConnection connection = workbook.Connections.Add("SQLConnection", "Sample connection with SQL Server", connectionString, query, ExcelCommandType.Sql)