in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

SQLiteConnection.GetSchema("DataTypes") throws System.Resources.MissingManifestResourceException

Last post 07-12-2009 10:28 AM by CatZ. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 07-04-2009 6:15 PM

    SQLiteConnection.GetSchema("DataTypes") throws System.Resources.MissingManifestResourceException

    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!

  • 07-04-2009 9:10 PM In reply to

    Re: SQLiteConnection.GetSchema("DataTypes") throws System.Resources.MissingManifestResourceException

    Working fine for me.  Anyone else having an issue?

     

  • 07-05-2009 4:09 AM In reply to

    Re: SQLiteConnection.GetSchema("DataTypes") throws System.Resources.MissingManifestResourceException

    Hi Robert!

    Thanks for your quick response. In the meantime I've tried several older versions and they work fine. I tested against 1.0.47.0, 1.0.48.0, 1.0.60.0 and the previous 1.0.62.0 - all work fine. Only with the current 1.0.63.0 I get the MissingManifestResourceException which says that the resources for the culture (which is neutral in my project) could not be found; System.Data.SQLite.SR.resources might not have been embedded correctly into System.Data.SQLite on compilation or a satellite assembly might be missing or not signed.

    I am running Windows Vista 64 Business (which I forgot to mention in my first post) and I set up all scenarios with x86 and x64 builds. I would not bother you if I was uncertain about this issue but I really think that there is a minor bug.

    I can go with 1.0.62.0 but I really hope that someone else can confirm this behaviour. If I can assist you in any way please let me know. Thank you again for your time and the great provider!

     

    Kevin

  • 07-08-2009 12:01 PM In reply to

    Re: SQLiteConnection.GetSchema("DataTypes") throws System.Resources.MissingManifestResourceException

    I'm also having a similar problem with version 1.0.63.0:

    System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "System.Data.SQLite.SR.resources" was correctly embedded or linked into assembly "System.Data.SQLite" at compile time, or that all the satellite assemblies required are loadable and fully signed.
       at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
       at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
       at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
       at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
       at System.Data.SQLite.SR.get_Keywords()
       at System.Data.SQLite.SQLiteConnection.Schema_ReservedWords()
       at System.Data.SQLite.SQLiteConnection.GetSchema(String collectionName, String[ restrictionValues)
       at System.Data.SQLite.SQLiteConnection.GetSchema(String collectionName)

    I also have no problems with version 1.0.62.0.

     

  • 07-08-2009 10:41 PM In reply to

    Re: SQLiteConnection.GetSchema("DataTypes") throws System.Resources.MissingManifestResourceException

    I've sorted this out -- it was a bug in the 63 build.  I'll have a 64 build up tomorrow.

     

  • 07-11-2009 1:39 PM In reply to

    • CatZ
    • Not Ranked
    • Joined on 07-11-2009
    • Posts 3

    Re: SQLiteConnection.GetSchema("DataTypes") throws System.Resources.MissingManifestResourceException

     I still get the same error with build 64 as I did with 63. Should I go back to build 60?

  • 07-11-2009 2:03 PM In reply to

    • CatZ
    • Not Ranked
    • Joined on 07-11-2009
    • Posts 3

    Re: SQLiteConnection.GetSchema("DataTypes") throws System.Resources.MissingManifestResourceException

     Actually I get the same exception with all versios of SQLite using NHibernate. WHYYYYYYYYYYYYYYYYYYYYYYYYYYY???? How do I fix it

  • 07-11-2009 3:58 PM In reply to

    Re: SQLiteConnection.GetSchema("DataTypes") throws System.Resources.MissingManifestResourceException

    Check very carefully all the loaded modules when you get this exception to see what version of the .NET provider is loaded.

    I've verified the problem no longer exists -- but you may still have an outdated reference to build 63 in your project.

  • 07-12-2009 10:28 AM In reply to

    • CatZ
    • Not Ranked
    • Joined on 07-11-2009
    • Posts 3

    Re: SQLiteConnection.GetSchema("DataTypes") throws System.Resources.MissingManifestResourceException

     I had to edit the project files manually and then some copy paste of the dll's and it's again working. Thanks for your help!

Page 1 of 1 (9 items)
Powered by Community Server (Commercial Edition), by Telligent Systems