「ConnectionString」修訂間的差異
跳至導覽
跳至搜尋
小 |
|||
行 1: | 行 1: | ||
'''ConnectionString''',{{wikipedia|Connection_string|lang=en}} | '''ConnectionString''',{{wikipedia|Connection_string|lang=en}} | ||
+ | |||
+ | ==技術文件== | ||
+ | *[https://docs.microsoft.com/zh-tw/dotnet/framework/data/adonet/connection-string-syntax connection-string-syntax] | ||
*[http://www.connectionstrings.com/ The Connection String Reference](各種資料庫的Connection Strings範例) | *[http://www.connectionstrings.com/ The Connection String Reference](各種資料庫的Connection Strings範例) | ||
於 2020年12月26日 (六) 00:37 的修訂
ConnectionString,參照:『維基百科~Connection_string』
技術文件
- [https://docs.microsoft.com/zh-tw/dotnet/framework/data/adonet/connection-string-syntax connection-string-syntax]
- The Connection String Reference(各種資料庫的Connection Strings範例)
應用
- 以下以ASP.NET於Web.config裡的使用方式記載,其他的格式請參照[1]
MS-SQL Server
<connectionStrings> <add name="myConnectionString" connectionString="Data Source=localhost;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;" providerName="System.Data.SqlClient"/> </connectionStrings>
MS-SQL Server Express
<connectionStrings> <add name="myConnectionString" connectionString="Data Source=localhost\SQLExpress;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;" providerName="System.Data.SqlClient"/> </connectionStrings>
Oracle
<connectionStrings> <add name="myConnectionString" connectionString="Data Source=MyOracleDB;Persist Security Info=True;User ID=myUsername;Password=myPassword;Unicode=True" providerName="System.Data.OracleClient"/> </connectionStrings>
相關
自組ConnectionString
- Building Connection Strings(.Net Framework)