Error in Open SqliteDatabase
Hi! In version 5.0.12 the code below works fine (example used: GetConnection("D:\Banco\sqlite\bancoTeste.db")):
public static SqliteConnection GetConnection(string caminhoBanco)
{
string ConnectionString = String.Format("Data Source={0};", caminhoBanco);
SqliteConnection connection = new SqliteConnection(ConnectionString);
if (connection.State != ConnectionState.Open)
connection.Open();
return connection;
}
but in the latest (6.0.0) version it has the following error:
The type initializer for 'Microsoft.Data.Sqile.SQliteConnection' threw an exception
at Microsoft.Data.Sqlite.Utilities.ApplicationDataHelper.GetFolderPath(String propertyName)
at Microsoft.Data.Sqlite.Utilities.ApplicationDataHelper.get_LocalFolderPath()
at Microsoft.Data.Sqlite.Utilities.BundleInitializer.Initialize()
at Microsoft.Data.Sqlite.SqliteConnection..cctor()
Changed anything from the previous version to the new version?
Microsoft.Data.Sqlite: version 6.0.0 Target framework: .NET 4.8 Operating system: Windows 11
Duplicate of #26574.
Will this bug be fixed in version 6.0.1?
@paulocarinhena Yes; that's what the 6.0.1 milestone indicates.
@paulocarinhena Yes; that's what the 6.0.1 milestone indicates.
wonderful, thank you very much for your attention!