I can build an app using Windows Forms connecting to a SQL Server CE .sdf
file to read and write. Now I need to do the same for a class library .dll project which intended to be a Revit Add-in so I added app.config
and Settings.settings
as well but in vain!
Any suggestion to properly save the connection string so it would work for multiple desktops?
Thanks in advance!
If you use DataDirectory, you can set the value of that in code:
string path = // folder path to the database file
AppDomain.CurrentDomain.SetData("DataDirectory", path);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.