建议多去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.