Arcgis Engine 连接数据库
public IPropertySet ConnectSdeSQL(string sAddress, string sDBName, string sUser, string sPassword)
{
IPropertySet propSet = new PropertySetClass();
propSet.SetProperty("SERVER", sAddress);
propSet.SetProperty("INSTANCE", "sde:sqlserver:" + sAddress + "");
propSet.SetProperty("DATABASE", sDBName);
propSet.SetProperty("USER", sUser);
propSet.SetProperty("PASSWORD", sPassword);
propSet.SetProperty("VERSION", "DBO.DEFAULT");
propSet.SetProperty("AUTHENTICATION_MODE", "DBMS");
return propSet;
}
public IPropertySet ConnectSdeOracle(string sAddress, string sDBName, string sUser, string sPassword)
{
IPropertySet propSet = new PropertySetClass();
propSet.SetProperty("SERVER", sAddress);
propSet.SetProperty("INSTANCE", "sde:oracle11g:" + sDBName + "");
propSet.SetProperty("DATABASE", sDBName);
propSet.SetProperty("USER", sUser);
propSet.SetProperty("PASSWORD", sPassword);
propSet.SetProperty("VERSION", "SDE.DEFAULT");
return propSet;
}
浙公网安备 33010602011771号