Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using App_Data in connection string

simple stuff, I want to use App_Data as my db storage folder.

How can I reference App_Data in my connString.

<add name="ConnectionString" connectionString="Data Source=mydb.sqlite; ..." />
like image 853
panjo Avatar asked Aug 29 '12 10:08

panjo


1 Answers

<add name="ConnectionString" 
connectionString="Data Source=|DataDirectory|\MyDb.sqlite;......" />

The |DataDirectory| token would expand to an App_Data folder under the root of a web application.

like image 159
Vishal Suthar Avatar answered Oct 01 '22 14:10

Vishal Suthar