3 Replies - 2261 Views - Last Post: 03 December 2012 - 07:25 PM Rate Topic: -----

#1 TheBlueTorch  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 28-November 12

-SQLITE- missing database file after deployment -SQLITE-

Posted 28 November 2012 - 01:24 PM

Hi all,

Currently i'm developing a small app using SQLite as my database engine. I haven't had any problem until now (indeed I can connect to the database file, insert, update and delete) but after deployment I cannot access the database file manually. One of my requirements is the posibility to interchange the database file as needed. So I have a directory struct that contains a "Data" directory which stores the database file (something like \Data\projectDB.sqlite). In short, I need to copy and paste a new projectDB.sqlite file into the directory "Data" -yes, replacing the original file- but doing this doesn't affects the app (i can't see the preloaded data in the new database). ¿Is being the database stored somewhere else after deployment? and ¿Can it be replaced somehow?

Thanks in advance,

Is This A Good Question/Topic? 0
  • +

Replies To: -SQLITE- missing database file after deployment -SQLITE-

#2 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3663
  • View blog
  • Posts: 11,482
  • Joined: 05-May 12

Re: -SQLITE- missing database file after deployment -SQLITE-

Posted 29 November 2012 - 06:43 PM

It's a little hard to help you diagnose your problem without seeing your code for opening your database, and for deploying your program.
Was This Post Helpful? 0
  • +
  • -

#3 TheBlueTorch  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 28-November 12

Re: -SQLITE- missing database file after deployment -SQLITE-

Posted 03 December 2012 - 07:08 PM

Hi Skydiver,

Thanks for your reply. I've been messing around with the deployment settings and now I'm able to manually modify and/or replace the database file. What is working for me now:

In the Solution:
-Add the database file to the project
-Set the Build Action property to None
-Set the Copy To Output Directory property to Copy Always

In the Setup project:
-Manually add the Data folder inside the Application folder.
-Set the Always Create folder property to True.
-Manually add the database file inside the Data folder.

Now I'm facing a similar problem with the app.config file (none of the changes made on it reflects in the app). But I guess that it's a configuration problem too.
Was This Post Helpful? 0
  • +
  • -

#4 TheBlueTorch  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 28-November 12

Re: -SQLITE- missing database file after deployment -SQLITE-

Posted 03 December 2012 - 07:25 PM

Ok I was wrong. After deployment the app.config file is named like <appname>.exe.config.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1