Question: In ASP.Net, referencing my Access database from My Computer can be done like below:

```
Dim cn As New OleDbConnection("Provider = Microsoft.JET.OLEDB.4.0;" & "Data Source = C:/Class.mdb")

```

If I were to put it into my project App\_data folder, how do I reference it?

Answer: 
I believe what you want is the DataDirectory. Your string would look like so:

```
"Provider=Microsoft.JET.OLEDB.4.0;Data Source=|DataDirectory|\Class.mdb"

```

More connection strings [here](http://www.connectionstrings.com/access).
Sure, you can use the following format: Data Source=|DataDirectory|Foobar.sdf. See this question for details - [Where is the SQL Server Compact file?](https://stackoverflow.com/questions/7343113/where-is-the-sql-server-compact-file)