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 3395400
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:17:08+00:00 2026-05-18T04:17:08+00:00

I am developing a .NET (C#) application with a binary file format. The plan

  • 0

I am developing a .NET (C#) application with a binary file format. The plan is to migrate to binary format to an SQLite database file which is easier to maintain.

I have never used this before so I have a few questions.

  1. The SQLite implementation of http://sqlite.phxsoftware.com/ contains a LINQ provider. I have played with it locally, but I somehow have to incorporate this into something a team of developers can use. I can place the database file on my PC in a folder which is included in the source repository, but eventually it should end up in the clients AppData folder. How can I achieve this using a generated database file? When I create the database file manually I can easily tell the application where to store it.

  2. I have a fair knowledge of SQL queries, so my initial plan was to create a library which does a port of a DataModel to the database using SQL queries. The downside of this is that when a field changes or is added I have to update a lot of things: The database create query, the database update or alter queries, the DataModel. From what I gather I can create a database using the designer, but when my application is updated to version 2 next month and my database changes I want to migrate the user’s existing database to the new version. Doing this manually I can write update queries and work with some sort of incremental database counter to check this, but how does this work using a generated database?

So is it better, easier and safer to use SQL queries directly, or can someone point me to a decent usable use-case of using a generated database?

Thanks.

  • 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-18T04:17:08+00:00Added an answer on May 18, 2026 at 4:17 am

    For your first question I can suggest you to make your application in ASP.Net or make use of webservice (the second is more suitable for your objectives). For webservices I think you should code a session in the call of a method like this:

    ...
    [WebMethod]
    public DataSet GetData(object id, string sessionId)
    {
       try
       {
          DataSet ds = null;
          CUser user = Global.GetSession(sessionId);
    
          lock
          {
             //Your code to get data from the database
          }
          return ds;
       }
       catch(Exception ex)
       {
           throw;
       }
    }
    

    For your second question I suggest to use FluentNhibernate. I’ve used FluentNhibernate and is very easy to model your database and even generate it. This is just a glimpse of the code used to configure the SQLite implementation;

    private static ISessionFactory CreateSessionFactory()
    {
      return Fluently.Configure()
        .Database(
          SQLiteConfiguration.Standard
            .UsingFile("firstProject.db")
        )
        .Mappings(m =>
          m.FluentMappings.AddFromAssemblyOf<Program>())
        .ExposeConfiguration(BuildSchema)
        .BuildSessionFactory();
    }
    
    private static void BuildSchema(Configuration config)
    {
      // delete the existing db on each run
      if (File.Exists(DbFile))
        File.Delete(DbFile);
    
      // this NHibernate tool takes a configuration (with mapping info in)
      // and exports a database schema from it
      new SchemaExport(config)
        .Create(false, true);
    }
    

    You can see the FluentNhibernate wiki page and there’s a introductory implementation of this framework. Finally to admin your SQLite database I suggest you to use SQLite Administrator.

    alt text

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

Sidebar

Related Questions

No related questions found

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.