Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

sqlite error "Unable to open database file"

Posted on 2010-08-15
3
Medium Priority
?
1,978 Views
Last Modified: 2013-12-21
Hi,

I have code that I am trying to open sqlite database, I am getting error "Unable to open database file". My path to database is correct. I am working on Windows mobile,

My code:
string s = "Data Source=" + AppPath() + "\\DB\\test.sqlite";
            SQLiteConnection conn = new SQLiteConnection();
            conn.ConnectionString = s ;
            try
            {
            conn.Open();
            }
            catch(Exception ex)
            {
           
            }

Please help me to solve issue
0
Comment
Question by:mkk39
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Expert Comment

by:bkokx
ID: 33444300
Do you have read/write access in that folder?
0
 
LVL 28

Expert Comment

by:strickdd
ID: 33444710
Definitely a permissions issue of some sort. Verify the user you are running under. Then on the folder and the test.sqlite file, right click and go to security. Verify that your user has all but Full Control on those. Easiest way is to check "Full Control" and then uncheck it, this will select everything but full control.
0
 
LVL 5

Accepted Solution

by:
sindhuxyz earned 2000 total points
ID: 33548628
This is path issue. Make sure the path
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let me explain this picture a little bit.  First, in case you haven't already guessed, you are looking at my 2 phones, an Android Samsung Galaxy S5 on the left and an iPhone 5 on the right.  They are on their respective cradles on my desk.  But, you…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question