注意:其中searchpath是架构,要改成你库中的架构名字
Server=27.151.1.54;Port=5866;UId=design;Password=000;Database=design;searchpath=design //常见错误 Unsupported command 特殊网络会出现 ConnectionString = "....Pooling=false",//加上禁用连接池
安装2个DLL
searchpath是架构名字
SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { DbType = DbType.HG, ConnectionString="Server=27.151.1;Port=5866;UId=design;Password=123;Database=design;searchpath=design", IsAutoCloseConnection = true }); //字符串中 searchpath是当前架构的名字
SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { DbType = DbType.HG, ConnectionString="Server=27.151.1;Port=5866;UId=design;Password=123;Database=design;searchpath=design", IsAutoCloseConnection = true });
var db= new SqlSugarClient(new ConnectionConfig(){ DbType = SqlSugar.DbType.HG, ConnectionString = Config.ConnectionString, IsAutoCloseConnection = true, MoreSettings= new ConnMoreSettings() { PgSqlIsAutoToLower = false,//增删查改支持驼峰表 PgSqlIsAutoToLowerCodeFirst = false, // 建表建驼峰表。5.1.3.30 }})
默认不支持ms3加密,需要看下面文章操作
https://www.donet5.com/Ask/9/23508
//常见错误 Unsupported command 特殊网络会出现 ConnectionString = "....Pooling=false",//加上禁用连接池
2016 © donet5.comApache Licence 2.0