about intraweb(20分)

  • 主题发起人 主题发起人 qddmh
  • 开始时间 开始时间
Q

qddmh

Unregistered / Unconfirmed
GUEST, unregistred user!
我用DELPHI7中的intraweb做了一个程序, 运行时告诉我
尚未调用CoInitialize
出错语句为:
constructor TUserSession.Create(AOwner: TComponent);
begin
inherited;
Datamodule1 := TDatamodule1.Create(AOwner);
end;
为什么, 请帮我解答.
 
帮帮忙, 是否intraweb不能用ADO组建????
 
只需要将应用程序的Server Controller的InitializeCOM置成True即可。
 
bnpysse:
我没找到此属性, 帮忙!
 
建议多去borland新闻组,那里就有很多intraweb的回答,你的里面有
我复制给你看
Hi,

I've tried to create a stand-alone IntraWeb application with a datamodule.
In the datamodule, I drop TADODatabase, TADODataSet, and a TDataSource
components, hook them up, and open things in the DataModuleCreate event.. On
formMain, I drop a TIWDBGrid and a TIWDBNavigator, use the DatamoduleUnit,
and set the DataSources to point to the one in the datamodule. When I run
this app, I get a "CoInitialize has not been called." EOLEException on this
line:
Datamodule1 := TDatamodule1.Create(AOwner);
in the call to TUserSession.Create in the ServerController unit.

What am I missing?

Thanks in advance,


John



回答
Set InitializeCOM to True in your application's server controller.
回答
Hey, hey, Fr閐閞ic,

Thanks a lot. Like butter :).

Actually, my options for the TIWServiceController's COMInitialization
property are ciMultiThreaded, ciNone, and ciNormal. Having learned some
caution at the beginning of a new relationship, I chose the latter option,
and it ran as designed.
回答
I had the same problem resolved on the intraweb newsgroup. But I'm still
not sure if it should run ciNormal or ciMultiThreaded (my guess would be to
use ciMultithread when creating a ISAPI dll).

Anyone now which for what?

Thanks.
 
TO qddmh:
把ServerController頁的comInitialization設為ciMultiThreaded,當然設成ciNormal應該也是可以的
 
接受答案了.
 
后退
顶部