EF Core 2.1 Keyword not supported: 'license key'.

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for SQLite
Post Reply
dgxhubbard
Posts: 42
Joined: Fri 14 Aug 2015 20:58

EF Core 2.1 Keyword not supported: 'license key'.

Post by dgxhubbard » 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:

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;



Shalex
Site Admin
Posts: 8295
Joined: Thu 14 Aug 2008 12:44

Re: EF Core 2.1 Keyword not supported: 'license key'.

Post by Shalex » Wed 04 Jul 2018 11:37

Your stack trace includes a different provider, it should be Devart.Data.SQLite instead of System.Data.SqlClient.

Try using Devart.Data.SQLite.SQLiteConnectionStringBuilder instead of System.Data.SqlClient.SqlConnectionStringBuilder in your code.

dgxhubbard
Posts: 42
Joined: Fri 14 Aug 2015 20:58

Re: EF Core 2.1 Keyword not supported: 'license key'.

Post by dgxhubbard » Wed 04 Jul 2018 15:44

Thanks shalex. I didn't even notice that

Post Reply