I'm working on a ASP.NET 2.0 web application right now, which uses a Visual FoxPro database. I want the database to sit in the App_Data folder of my web application and I also want my connection string to use a relative path to access my database.
I found that SQL Express supports this, but the documentation suggests that it'll only work for the AttachDB value in a SQL Express connection string. Luckily this is not true. As shown in the sample below. The "|DataDirectory|" element can be used to point to the App_Data folder of your webapplication. I assume this will work for any database connection string.
<connectionStrings>
<add name="Develop-One.Framework.Properties.Settings.ConnectionString"
connectionString="Provider=VFPOLEDB.1;Data Source=|DataDirectory|UserData"
providerName="System.Data.OleDb"/>
</connectionStrings>