0

I would like to know how can I connect to a SQL Server Compact Edition database from my web application?

Usually I insert the connection string in the code. How can I connect to the database which is situated in App_Data in the web.config file?

Thanks in advance

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

0

In your web.config have a connectionString like

<connectionStrings>
<add name="MyConnection" connectionString="Data Source=|YourDirectory|\DBName.sdf"/>
</connectionStrings>

Further reading here if required.

Izzy
  • 6,740
  • 7
  • 40
  • 84