Solved

sqlite error "Unable to open database file"

Posted on 2010-08-15
3
1,819 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 500 total points
ID: 33548628
This is path issue. Make sure the path
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Data organization issue 7 56
ModalPopup  question 22 58
What are MicroServices? 4 68
Difference between Leaflet and MapBox? 5 47
Preface: This article is part of a series focused on cross platform mobile app development (specifically Android and iOS) using the Alloy framework and Titanium Studio made by Appcelerator (https://www.appcelerator.com/). This article presumes a wor…
A short article about problems I had with the new location API and permissions in Marshmallow
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

751 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