使用 ADO 在 IntraWeb 上共同初始化错误
已经询问了邪恶交换,但一如既往,这没有帮助。 我今天遇到了这个问题:
当使用 IntraWeb 创建独立的 Web 应用程序时,当我尝试在浏览器中测试应用程序的会话时,我在 IDE 中遇到此异常:
第一次机会例外,价格为 $7C812A6B。 异常类 EOleSysError 与 消息'CoInitialize尚未被 叫'。 进程WebContactManager.exe (1112)
如果我在 IDE 异常对话框中单击“继续”,浏览器本身只会显示:
200 好
...而不是我的主窗体上的控件。
当我用其他数据库组件(例如dbExpress或BDE)替换ADO时,似乎不会出现此错误。
这个错误告诉我什么,我该如何修复它?
(注意,我使用的是 D2007 内置的库存“VCL for the Web”IntraWeb 组件)。
预先感谢您的任何和所有帮助!
Already asked on the Evil Exchange, but as always that was no help. I'm having this problem today:
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:
First chance exception at $7C812A6B.
Exception class EOleSysError with
message 'CoInitialize has not been
called'. Process WebContactManager.exe
(1112)
If I click "continue" on the IDE exception dialog, the browser itself just shows:
200 OK
...rather than the controls on my main form.
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?
(Note I'm using the stock "VCL for the Web" IntraWeb components which come built-in with D2007).
Thanks in advance for any and all help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您引用的链接中提供的“解决方案”基本上是错误的或至少不完整。 只有将 ServerController.ComInitialization 设置为 ciMultiThreaded 为 true IW 才能保证每个线程都能正确初始化 COM。 (例如考虑 Ajax 回调)
如果您创建自己的自定义线程,那么您将必须自己为该线程调用 CoInitialize - 因为 Intraweb 不知道您的自定义线程。
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)
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.
刚刚在此处找到了答案:
Just found an answer to this here: