使用ADO在IntraWeb上共初始化错误 [英] Coinitialize error on IntraWeb using ADO

查看:134
本文介绍了使用ADO在IntraWeb上共初始化错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

已经在Evil Exchange上问过了,但一如既往,这没有帮助。我今天遇到了这个问题:

Already asked on the Evil Exchange, but as always that was no help. I'm having this problem today:

当使用IntraWeb创建独立的Web应用程序时,当我尝试从我的会话中测试会话时,我在IDE中遇到此异常。浏览器中的应用程序:

When creating a stand alone web application using IntraWeb, I get this exception in the IDE when I try to test out a session from my app in the browser:


$ 7C812A6B的第一次机会异常。
带有
消息 CoInitialize未被调用
的异常类EOleSysError。处理WebContactManager.exe
(1112)

First chance exception at $7C812A6B. Exception class EOleSysError with message 'CoInitialize has not been called'. Process WebContactManager.exe (1112)

如果我在IDE异常对话框中单击继续,则浏览器本身只是显示:

If I click "continue" on the IDE exception dialog, the browser itself just shows:


200 OK

200 OK

。 ..而不是主窗体上的控件。

...rather than the controls on my main form.

当我用dbExpress或BDE等其他数据库组件替换ADO时,似乎不会发生此错误。

This error does not seem to occur when I replace ADO with other database components such as dbExpress or BDE.

这个错误告诉我什么,如何解决?

What is this error telling me, and how do I fix it?

(请注意,我正在使用

在此先感谢您的所有帮助!

Thanks in advance for any and all help!

推荐答案

您引用的链接基本上是错误的,或者至少是不完整的。只有将ServerController.ComInitialization设置为ciMultiThreaded为true IW,才能保证每个线程将正确初始化COM。 (例如,考虑Ajax回调)

The "solution" provided in the link you quoted is basically wrong or at least incomplete. Only by setting ServerController.ComInitialization to ciMultiThreaded to true IW will gurantee that every thread will get COM initialized correctly. (for example think about Ajax callbacks)

如果您创建自己的自定义线程,则您将不得不自己为该线程调用CoInitialize-因为Intraweb不知道关于您的自定义线程。

If you create your own custom threads then you will have to call CoInitialize for that thread on your own though - as Intraweb does not know about your custom threads.

这篇关于使用ADO在IntraWeb上共初始化错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆