I have this code for creating a path for a database:
static string folder = Application.UserAppDataPath;
static string fisier = "prog.db";
string file = folder + "\\" + fisier;
And this code for delete the database:
if (System.IO.File.Exists(file))
System.IO.File.Delete(file);
And this code for wirting the database:
if (!System.IO.File.Exists(file))
{
System.IO.File.WriteAllText(file, "");
}
The codes work perfectly, but the problem is with the privileges. To some people, is a problem with the deleting of database, the application will crash becouse will can not delete the database. Not works only for some people, in my case, work perfectly, but I want to resolve the problem to not crash if you don't have the privileges.