Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6651795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:03:14+00:00 2026-05-26T01:03:14+00:00

I read and implemented Trying to using Nhibernate with Mono & SQLite – can't

  • 0

I read and implemented Trying to using Nhibernate with Mono & SQLite – can't find System.Data.SQLite
However, as the last comment there states this seems not to work with NHibernate 3.1

The error is

HibernateException: The IDbCommand and IDbConnection implementation in
the assembly Mono.Data.Sqlite could not be found. Ensure that the
assembly Mono.Data.Sqlite is […reachable…]

I have Mono.Data.Sqlite in the GAC.
I have tried both specifying “Mono.Data.Sqlite” as well as typeof(Mono.Data.Sqlite.SqliteConnection).Assembly.FullName as the name of the assembly

Has anyone any Ideas how to get this working?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:03:14+00:00Added an answer on May 26, 2026 at 1:03 am

    There is a problem in the answer of Trying to using Nhibernate with Mono & SQLite – can't find System.Data.SQLite .
    For the given constructor (3 parameters) to work the assembly in question (Mono.Data.Sqlite) needs to be loaded first.

    This works if the 4-parameter base contructor is used like this:

    public class MonoSQLiteDriver : NHibernate.Driver.ReflectionBasedDriver  
    {  
            public MonoSQLiteDriver() 
                : base(
                "Mono.Data.Sqlite",
                "Mono.Data.Sqlite",  
                "Mono.Data.Sqlite.SqliteConnection",  
                "Mono.Data.Sqlite.SqliteCommand")  
        {  
        }  
    
        public override bool UseNamedPrefixInParameter {  
            get {  
                return true;  
            }  
        }  
    
        public override bool UseNamedPrefixInSql {  
            get {  
                return true;  
            }  
        }  
    
        public override string NamedPrefix {  
            get {  
                return "@";  
            }  
        }  
    
        public override bool SupportsMultipleOpenReaders {  
            get {  
                return false;  
            }  
        }  
    }  
    

    (Still, credit goes to http://intellect.dk/post/Why-I-love-frameworks-with-lots-of-extension-points.aspx for the original idea – thanks.)

    And if you use FluentNHibernate, then you’ll also need:

    public class MonoSQLiteConfiguration : PersistenceConfiguration<MonoSQLiteConfiguration>
    {
        public static MonoSQLiteConfiguration Standard
        {
            get { return new MonoSQLiteConfiguration(); }
        }
    
        public MonoSQLiteConfiguration()
        {
            Driver<MonoSQLiteDriver>();
            Dialect<SQLiteDialect>();
            Raw("query.substitutions", "true=1;false=0");
        }
    
        public MonoSQLiteConfiguration InMemory()
        {
            Raw("connection.release_mode", "on_close");
            return ConnectionString(c => c
                .Is("Data Source=:memory:;Version=3;New=True;"));
    
        }
    
        public MonoSQLiteConfiguration UsingFile(string fileName)
        {
            return ConnectionString(c => c
                .Is(string.Format("Data Source={0};Version=3;New=True;", fileName)));
        }
    
        public MonoSQLiteConfiguration UsingFileWithPassword(string fileName, string password)
        {
            return ConnectionString(c => c
                .Is(string.Format("Data Source={0};Version=3;New=True;Password={1};", fileName, password)));
        }
    }
    

    I have not encountered any problems so far…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Can Read-Only Properties be Implemented in Pure JavaScript? I have an Object
I read some source code of ZenTest but didn't find where it is implemented.
How is SAML SSO typically implemented? I've read this (n.b. obsolete) about using SAML
I'm working on a real time application implemented using in a SOA-style (read loosely
I am trying to implemented F1 help for my WinForm application. I have read
I was trying to implement read/write lock using mutex only (just for learning). Just
I am trying to implement privileges using NHibernate, and what I want to do,
I'm trying to serialize some data to xml in a way that can be
I am trying to read a file which is selected using an input type
I'm trying to implement a pattern I read from Don Syme's blog ( https://blogs.msdn.microsoft.com/dsyme/2010/01/09/async-and-parallel-design-patterns-in-f-parallelizing-cpu-and-io-computations/

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.