I am creating windows form application.
This application will use Microsoft Access Database to record the details.
I want to know how can i provide connection string to that database if i create that installable setup file.
Currently i am using like this.
string connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Users\\Amrit\\Desktop\\Database.accdb ;Persist Security Info=False;";
How can i add universal connection string so that it will work on any computer when installed.
It really does depend on where you intend to install the file. if it is going to be in a consistent location you could use something like (obviously changing
Environment.SpecialFolderas required):Then build up your connection string using
source.