石头之编程之路吧 关注:1贴子:9
  • 3回复贴,共1

数据库连接字符串

只看楼主收藏回复

此贴将解析字符串的几种常用写法


1楼2013-01-19 19:59回复
    code first:
    <add name="MovieDBContext" connectionString="Data Source=|DataDirectory|Movies.sdf" providerName="System.Data.SqlServerCe.4.0"/>


    2楼2013-01-20 00:12
    回复
      Integrated Security:
      <add name="ProductDBContext" providerName="System.Data.SqlClient" connectionString="Data Source=.;Initial Catalog=ProductDB;Integrated Security=True"/>


      3楼2013-01-20 23:14
      回复
        Another Way:
        <add name="ProductDBContext" providerName="System.Data.SqlClient" connectionString="Data Source=.;Initial Catalog=ProductDB;User ID=sa;Password=P@ssword12"/>


        4楼2013-01-20 23:17
        回复