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

  • Home
  • SEARCH
  • 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 6012167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:21:53+00:00 2026-05-23T02:21:53+00:00

I am using SQLite.NET with C#[ visual studio 2008] and added the ‘System.Data.SQLite.dll’ as

  • 0

I am using SQLite.NET with C#[ visual studio 2008] and added the ‘System.Data.SQLite.dll’ as reference. The following code works with Windows Application for fetching data from my database file into a datagrid.

    private void SetConnection()
    {
        sql_con = new SQLiteConnection("Data Source=emp.db;Version=3;");
    }

    public DataTable LoadData()
    {
        SetConnection();
        sql_con.Open();
        sql_cmd = sql_con.CreateCommand();
        string CommandText = "select * from employeedetails";
        transaction=sql_con.BeginTransaction();
        DA = new SQLiteDataAdapter(CommandText, sql_con);
        DS.Reset();
        DA.Fill(DS);
        DT = DS.Tables[0];
        transaction.Commit();
        sql_con.Close();
        return DT;
    }

Invoking in:

    private void Form1_Load(object sender, EventArgs e)
    {
        EmpTable obj = new EmpTable();     
        this.dataGridView1.DataSource = obj.LoadData();
    }

The same code not working with C# ‘Smart Device Application’. It shows an exception: no such table ’employeedetails’.

For Smart Device Application I have added the System.Data.SQLite.dll from “SQLite/CompactFramework” folder.

Please help me to resolve this.

Thanks in advance.

  • 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-23T02:21:53+00:00Added an answer on May 23, 2026 at 2:21 am

    Thank You Guys,

    I’ve resolved the Problem. As ‘siyw’ said, the problem was the application could not find the “db file”.

    For windows application,

    The db file has to be located in debug folder where the .exe file is generated. So that, no need to specify the path of the DB file.

    For Smart Device Application,

    The DB file will be generated in the root folder of the device. If we bind the db file with exe means, it wont find it and it will create a new database in root folder.

    To avoid that, while crating CAB file we have to create custom folder [ ex. DBfolder ] and put the db file in the folder.
    Set the path in the connection String as,

    sql_con = new SQLiteConnection("Data Source=DBfolder/emp.db;Version=3;");
    

    Now, the db is found by the Application.

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

Sidebar

Related Questions

I'm using the following code (System.Data.SQLite within VB.net): Dim SQLconnect As New SQLite.SQLiteConnection() Dim
I'm trying to build System.Data.SQLite in Visual Studio using the source code downloaded from
Short Version : I'm using a 64bit dll (system.data.sqlite) in an Asp.net MVC app
Just some background, sorry so long winded. I'm using the System.Data.SQLite ADO.net adapter to
I am working on a CMS project using ASP.Net 3.5/Visual studio 2008.This is the
I'm asking about the .Net implementation - System.Data.SQLite. Are there guidelines to using it
I am using the official System.Data.SQLite ADO.NET provider for my application, and I am
I am using Visual Studio 2010 and using web deployment to promote the .Net
I am a newbie in regards to System.Data.SQLite and .NET, so bear with me.
I'm currently using Visual Studio 2010 and have created a 'ASP.NET MVC 3 Web

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.