Hello!
I am using SQLite.NET for over three years now and first of all I would like to say: Thank you for your great work with this data provider!
But today I stumbled over a new little bug: when trying to call SQLiteConnection.GetSchema("DataTypes") I get a System.Resources.MissingManifestResourceException.
I am using VisualStudio 2008 / C# .NET Framework 2.0 / latest SQLite.NET provider 1.0.63.0
Here is my source code to reproduce the error:
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SQLite;
using System.Data;
namespace SQLiteTester
{
class Program
{
static void Main(string[ args)
{
ColumnInfos();
}
static void ColumnInfos()
{
SQLiteConnection con = new SQLiteConnection(@"Data Source = test.db3; Version = 3;");
SQLiteCommand cmd = con.CreateCommand();
cmd.CommandText = "SELECT * FROM Test";
con.Open();
DataTable dtSchemaDataTypes = con.GetSchema("DataTypes");
SQLiteDataReader dr = cmd.ExecuteReader(CommandBehavior.SchemaOnly);
DataTable dt = dr.GetSchemaTable();
foreach (DataRow row in dt.Rows)
{
Console.WriteLine("ColumnName: " + row["ColumnName"]);
Console.WriteLine("AllowDBNull: " + (bool)row["AllowDBNull"]);
Console.WriteLine("ColumnSize: " + (int)row["ColumnSize"]);
Console.WriteLine("DataType: " + Type.GetType(row["DataType"].ToString()));
Console.WriteLine("IsAutoIncrement: " + (bool)row["IsAutoIncrement"]);
Console.WriteLine("DataTypeName: " + row["DataTypeName"]);
Console.WriteLine("ProviderSpecificDataType: " + row["ProviderSpecificDataType"]);
Console.WriteLine("IsUnique: " + (bool)row["IsUnique"]);
}
dr.Close();
con.Close();
}
}
}
Exception Details: (Sorry, this is in German; it says a satellite assembly is missing)
System.Resources.MissingManifestResourceException was unhandled
Message="Für die angegebene Kultur oder die neutrale Kultur konnten keine Ressourcen gefunden werden. Stellen Sie sicher, dass System.Data.SQLite.SR.resources beim Kompilieren richtig in die Assembly System.Data.SQLite eingebettet wurde, oder dass die erforderlichen Satellitenassemblys geladen werden können und vollständig signiert sind."
Source="mscorlib"
StackTrace:
bei System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
bei System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
bei System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
bei System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
bei System.Data.SQLite.SR.get_DataTypes()
bei System.Data.SQLite.SQLiteConnection.Schema_DataTypes()
bei System.Data.SQLite.SQLiteConnection.GetSchema(String collectionName, String[ restrictionValues)
bei System.Data.SQLite.SQLiteConnection.GetSchema(String collectionName)
bei SQLiteTester.Program.ColumnInfos() in E:\Users\Wintermute\Documents\Visual Studio 2008\Projects\SQLiteTester\SQLiteTester\Program.cs:Zeile 23.
bei SQLiteTester.Program.Main(String[ args) in E:\Users\Wintermute\Documents\Visual Studio 2008\Projects\SQLiteTester\SQLiteTester\Program.cs:Zeile 13.
bei System.AppDomain._nExecuteAssembly(Assembly assembly, String[ args)
bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Threading.ThreadHelper.ThreadStart()
InnerException:
I hope someone can confirm this - quick help would be much appreciated.
Thank you!