Switch Connectionstring to Appdata/Roaming

Asked

Viewed 46 times

-1

My application installed the database . mdf in Appdata/Roaming. Now I probably need to change my path from ConnectionString to this place. How do I do it?

I read online about using Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)

But where do I type this? In the Form1.cs where all the code is?

In the archive app.config has this code line:

connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\DatabaseIris.mdf;Integrated Security=True"

1 answer

0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.