Like Tree1Likes
  • 1 Post By nvoigt

mdf database problem

This is a discussion on mdf database problem within the C# Programming forums, part of the General Programming Boards category; Hi! i've created a database connection to a mdf file for my app. When inserting data into the db, it ...

  1. #1
    Android
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    375

    Question mdf database problem

    Hi!

    i've created a database connection to a mdf file for my app. When inserting data into the db, it didn't save the data between debug sessions. So i searched the net and found that when you specify the value "Do not copy" for the "Copy to output directory" property of the database, the db won't get overwritten between debug sessions. i did that and when trying to debug the prog i'm getting the exception "The underlying provider failed on Open.". when i specify "Copy always" for the db, i don't get this error. What's going on here? Please help.


    Thanks.
    Last edited by geek@02; 06-20-2012 at 10:19 AM.
    Some useless programs i've wrote : slprogrammersheaven
    Youtube: http://www.youtube.com/user/geekyzine
    My amature IT Blog: http://everything-geeky.blogspot.com/
    My Flash games: http://flashweed.blogspot.com/

    (and, sorry for my amature english)

  2. #2
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,139
    What's going on here?
    You didn't copy your db to the spot you expect it to be when you open it. Make sure you open it in the position it actually is.
    geek@02 likes this.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  3. #3
    Android
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    375
    Got it. Thanks
    Some useless programs i've wrote : slprogrammersheaven
    Youtube: http://www.youtube.com/user/geekyzine
    My amature IT Blog: http://everything-geeky.blogspot.com/
    My Flash games: http://flashweed.blogspot.com/

    (and, sorry for my amature english)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Database connectivity problem
    By Vxyz in forum Linux Programming
    Replies: 1
    Last Post: 08-02-2011, 10:55 AM
  2. C database problem
    By xniinja in forum C Programming
    Replies: 2
    Last Post: 06-07-2010, 11:54 AM
  3. database problem
    By ashb in forum C++ Programming
    Replies: 4
    Last Post: 04-01-2005, 03:26 PM
  4. VB - Database problem
    By eviscerator in forum Windows Programming
    Replies: 4
    Last Post: 01-07-2005, 01:54 AM
  5. database problem
    By teknikal in forum C Programming
    Replies: 6
    Last Post: 11-13-2002, 09:15 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21