当前位置:Gxlcms >
数据库问题 >
【ArcEngine】AE连接SDE_For_SQLServer参数设置
【ArcEngine】AE连接SDE_For_SQLServer参数设置
时间:2021-07-01 10:21:17
帮助过:27人阅读
public IWorkspace Getworkspace()
2 {
3 IPropertySet propertySet =
new PropertySetClass();
4 propertySet.SetProperty(
"SERVER",
"127.0.0.1");
5 propertySet.SetProperty(
"INSTANCE",
"sde:sqlserver:127.0.0.1");
6 propertySet.SetProperty(
"DATABASE",
"sde");
7 propertySet.SetProperty(
"USER",
"sa");
8 propertySet.SetProperty(
"PASSWORD",
"sa");
9 propertySet.SetProperty(
"VERSION",
"SDE.DEFAULT");
10 Type factoryType = Type.GetTypeFromProgID(
"esriDataSourcesGDB.SdeWorkspaceFactory");
11 IWorkspaceFactory workspaceFactory =
(IWorkspaceFactory)Activator.CreateInstance(factoryType);
12 return workspaceFactory.Open(propertySet,
0);
13 }
对于参数INSTANCE,
sde服务状态 |
参数值 |
已经启动 |
"5151" 或者 "sde",或者 “sde:sqlserver:127.0.0.1” |
未启动 |
“sde:sqlserver:127.0.0.1” |
【ArcEngine】AE连接SDE_For_SQLServer参数设置
标签:ret 数值 base password source sgd open sources sde