Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8230767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:14:34+00:00 2026-06-07T17:14:34+00:00

I make a database in VS and it doesn’t work so I delete it

  • 0

I make a database in VS and it doesn’t work so I delete it and try again but I get an error

“An attempt to attach an auto-named database for file C:\db.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.”

I thought when I clicked delete it deleted it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T17:14:35+00:00Added an answer on June 7, 2026 at 5:14 pm

    It sounds like you are going to the folder and deleting the database, maybe try doing it through programming in a Try_Catch statement. I found this on Microsoft’s website. That you can try.

    http://msdn.microsoft.com/en-us/library/ms171854.aspx

    using System.IO;
    
    namespace MySQLCEApplication
    {
        class Program
        {
            static void Main(string[] args)
            {
                // Call the File class Delete method to delete the database.
                File.Delete("Test.sdf");
            }
        }
    }
    

    You may also want to make sure the file path in the program is the actual file path you are deleting and that the database is not opened or in use by other applications.

    It could also be that the cache is not getting refreshed when you delete the database, try manually refreshing the cache. I had to do this while working on some hw assignments a few months ago. Here’s an article that speaks to that:
    http://connectsql.blogspot.com/2011/02/intellisense-in-sql-server-2008-is-time.html

    Hope it helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with a legacy database which doesn't use great conventions, but I'm unable
I make a java application using netbeans that connect to database , but i
Pardon me if the subject question doesn't make sense and let me try to
I'm trying to make database dumps of my Django site, but Django's native dumpdata
I was following a tutorial to make a database cursor, but I have hit
does it make sense to use an Filecache when using Sqlite as Database ?
How can we make one database restore date to date, like sunday to wednesday
I need to make a database that is highly localized. For almost all entities
I'm trying to make a database upgrade using a custom NSEntityMigrationPolicy . This is
Are there any good applications that people use with the MongoDB database to make

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.