EF Core 2.1 Keyword not supported: 'license key'.
Posted: Tue 03 Jul 2018 17:21
We setup a connection string as in the code below, then use it to get the data source using a connection string builder.
When the string builder is create an exception is thrown saying "Keyword not support 'license key'. Are we doing something wrong?
Refer to:
https://www.devart.com/dotconnect/sqlit ... ndard.html
I know you can set the license key once one connection is opened in an app domain the license key is not checked again, however we are using three DBMS so we include the license key at all times where it is needed.
Exception:
at System.Data.SqlClient.SqlConnectionStringBuilder.GetIndex(String keyword)
at System.Data.SqlClient.SqlConnectionStringBuilder.set_Item(String keyword, Object value)
at System.Data.Common.DbConnectionStringBuilder.set_ConnectionString(String value)
at System.Data.SqlClient.SqlConnectionStringBuilder..ctor(String connectionString)
Code:
When the string builder is create an exception is thrown saying "Keyword not support 'license key'. Are we doing something wrong?
Refer to:
https://www.devart.com/dotconnect/sqlit ... ndard.html
I know you can set the license key once one connection is opened in an app domain the license key is not checked again, however we are using three DBMS so we include the license key at all times where it is needed.
Exception:
at System.Data.SqlClient.SqlConnectionStringBuilder.GetIndex(String keyword)
at System.Data.SqlClient.SqlConnectionStringBuilder.set_Item(String keyword, Object value)
at System.Data.Common.DbConnectionStringBuilder.set_ConnectionString(String value)
at System.Data.SqlClient.SqlConnectionStringBuilder..ctor(String connectionString)
Code:
Code: Select all
var connStr = "Data Source=C:\Repository\GtNext\AppFiles\GtSamp820.db3;Password=we092uRc1SLKr;Persist Security Info=False;License Key=\"NotIncluded\"";
var bldr = new SqlConnectionStringBuilder ( connection.ConnectionString );
var databaseName = bldr.DataSource;