I'm making a windows forms project and I was wondering if its possible to point the connection string for my .mdf file to the folder of the programs .exe file so that when I send the program to my someone else it can still find the file.
This is what I'm using right now but I want it to point to the .exe file folder instead if possible. I've tried everything I can find on this topic and I can't figure it out.
string connectionString = @"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\Martin\source\repos\Guldkortet\Guldkortet\Kortregister.mdf;Integrated Security=True";