I am creating a SQL Compact demo, and I want to point the connection string in my App.config file to %CommonAppDataFolder% (the Special Folder token that points to c:\ProgramData
on Windows 7 machines). My current connection string hard-codes the ProgramData
folder reference:
Data Source=c:\ProgramData\Foresight Systems\SQL Compact Demo\LocalData.sdf
I'd like to change it to something like this:
Data Source=%CommonAppDataFolder%\Foresight Systems\SQL Compact Demo\LocalData.sdf
Obviously, that doesn't work. So, my question is: What is the correct syntax to embed a Special Folder in a connection string? Thanks for your help.