UPDATE
This commit is contained in:
@@ -22,8 +22,12 @@ public class pivot01Controller : ApiController
|
||||
var shopConnectionString = ConfigurationManager.ConnectionStrings["shopConn"]?.ConnectionString;
|
||||
if (!string.IsNullOrEmpty(shopConnectionString))
|
||||
{
|
||||
// 移除不相容的 Provider 參數
|
||||
_connectionString = shopConnectionString.Replace("Provider=SQLOLEDB;", "");
|
||||
// 移除不相容的 Provider 參數(包含 SQLOLEDB 和 SQLNCLI11)
|
||||
_connectionString = shopConnectionString
|
||||
.Replace("Provider=SQLOLEDB;", "")
|
||||
.Replace("Provider=SQLNCLI11;", "")
|
||||
.Replace(" Provider=SQLOLEDB", "")
|
||||
.Replace(" Provider=SQLNCLI11", "");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user