在独立应用程序中使用 Direct Connect 访问 ArcGIS 数据库

发布于 2024-08-03 02:11:49 字数 663 浏览 4 评论 0原文

我在一家企业工作,负责基于 ESRI ArcGIS 设计、创建和维护自定义应用程序。一些客户使用 Direct Connect 连接到存储在 Oracle 或 MS SQLServer 上的数据库。几个月来我一直在使用独立应用程序。

我有一个用 Delphi 编写的应用程序。当然,我做的第一件事就是打开工作区。

pWorkspaceFactory:= CoSdeWorkspaceFactory.Create as IWorkspaceFactory;
pWorkspaceFactory.OpenFromFile('D:\directconnect.sde', WndHandle, pWorkspace);

这对于所有“正常”连接都适用,在某些直接连接的情况下也适用。但在调用 OpenFromFile 时,我可能会在不同的数据库上出现 stackoverflow。在 delphi 项目的项目选项中提高 MaxStackSize 使其可以在某些 Direct Connect 数据库上运行。但这并不适用于所有人。

有谁知道在没有 ArcMap 的情况下在独立应用程序中处理直接连接的正确方法?访问 ArcMap 中的数据库从来都不是问题,我认为 ArcMap 对直接连接有特殊的处理。

感谢您的所有想法和回复。愿答案与你同在 ;-)

问候

warheart

I work in an enterprise designing, creating and maintening custom applications on the base of ESRI ArcGIS. Some customers use Direct Connect, to connect to databases stored on Oracle or MS SQLServer. I have a problem with a standalone application for several months now.

I have an application, written in Delphi. One of the first things I do, of course, is opening the workspace.

pWorkspaceFactory:= CoSdeWorkspaceFactory.Create as IWorkspaceFactory;
pWorkspaceFactory.OpenFromFile('D:\directconnect.sde', WndHandle, pWorkspace);

This works fine for all "normal" connects, in some cases of direct connect it works fine too. But it may happen that I get on a different database a stackoverflow when calling OpenFromFile. Raising the MaxStackSize in the project options of the delphi project made it work on some Direct Connect databases. But it doesn't work for all.

Does anybody know the correct way to handle Direct Connects in standalone applications, without ArcMap? Accessing the databases in ArcMap has never been a problem, I think ArcMap has a special handling for Direct Connects.

Thanks for all ideas and replies. May the answer be with you ;-)

Greetings

warheart

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

删除会话 2024-08-10 02:11:49

感谢您的评论。我目前无法发布有关该异常的更多详细信息,因为我无法在我的测试数据库上重现它。只有在野外才会发生异常。但我可以说,它发生在(对我来说)关闭的 ESRI-Dll 中,我看不到 dll 方法的调用堆栈(OpenFromFile 是 ESRI-Dll 中的 ESRI 方法)。我想发布这样的东西,但我不能。

Thank you for your comment. I can't post more details about the exception at the moment, because I can't reproduce it on my testdatabases. It's only out in the wild the exception occurs. But I can say that it happens in a (for me) closed ESRI-Dll, i cannot see the call stack of the dlls methods (OpenFromFile is an ESRI-Method in an ESRI-Dll). I would like to post such things, but I can't.

﹎☆浅夏丿初晴 2024-08-10 02:11:49

会不会和你使用的DC库有关系?每个版本的 ArcGIS 和每种类型的数据库都有单独的库。

Could it have something to do with the DC library you are using? There are separate libraries for each version of ArcGIS and each flavor of database.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文