Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

sqlite error "Unable to open database file"

Posted on 2010-08-15
3
Medium Priority
?
2,090 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
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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

782 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