串連資料庫SQL Sever
<connectionStrings>
<add name="sqlservercon" connectionString="Data Source=PC-YZC\SQLEXPRESS;Initial Catalog=News;Persist Security Info=True;User ID=sa;Password=19920514"/>
</connectionStrings>
Data Source=PC-YZC\SQLEXPRESS 伺服器名稱
Initial Catalog=News 資料庫名稱
身分識別驗證 SQL Sever身分識別驗證
User ID=sa 使用者名稱
Password=19920514 密碼
啟動緩衝
cd C:\Windows\Microsoft.NET\Framework\v4.0.30319
aspnet_regsql -C "Data Source=PC-YZC\SQLEXPRESS;Initial Catalog=News;Persist Security Info=True;User ID=sa;Password=19920514" -ed -et -t "T_News1"
停止緩衝
cd C:\Windows\Microsoft.NET\Framework\v4.0.30319
aspnet_regsql -C "Data Source=PC-YZC\SQLEXPRESS;Initial Catalog=News;Persist Security Info=True;User ID=sa;Password=19920514" -dd
=================================================================================================
串連資料庫 Oracle
<connectionStrings>
<add name="oraclecon" connectionString="Data Source=orcl;Persist Security Info=True;User ID=yaozc;Password=yaozc;Unicode=True"
providerName="System.Data.OracleClient"/>
</connectionStrings>
Data Source=orcl 資料庫名
User ID=yaozc 使用者名稱
Password=yaozc 密碼