Catastrophic failure with COM+ client Options
来源:互联网 发布:js怎么隐藏span 编辑:程序博客网 时间:2024/05/16 05:28
这时我在新闻组上发布的帖子
大意是返回的记录集不能为空
I ran into 'Catastrophic failure' with my COM+ client app when passing the
query sql string to the procedure on COM+ server app, on the server app,
there is a datamodule containing ADOQuery component to fetch recordset from
the SQL Server Express 2005, both the server and client applications are on
the same computer.
Here are my code snippets:
//server side
{
dm : instance of class(TDataModule)
cn: TADOConnection;
qry: TADOQuery;
dspQuery: TDataSetProvider;
var RetVal: OleVariant): OleVariant;
begin
with dm do
begin
try
qry.Close;
qry.SQL.Clear;
qry.SQL.Add(strQuery);
qry.Open;
RetVal := dspQuery.Data;
SetComplete;
except
SetAbort;
end;
end;
Result := 1;
end;
//client side
//clCOM:TClientDataSet;
var
d:OleVariant ;
svr:ICOMTest ;
begin
svr :=CoCOMTest.CreateRemote('127.0.0.1');
strQuery := 'Select top ' + IntToStr(len) +
' * from Lcustomers where customerid like ''' + bgn + '%'';';
svr.GetRemoteRecordset(strQuery ,d);
clCOM.Data :=d;
......
end;
What's wrong with my codes?
I made a slight modification on the codes on server side, the dm would be
created dynamically when executing TCOMTest.GetRemoteRecordset, the
Catastrophic failure disappeared, but another exception 'Invalid Data
Packet' was threwn out. How to handle it?
来自专家的答复:
Most likely an Exception on the server so that Retval isn't assigned with the
Data from you datasetprovider. You have to check that your Datapacket is valid
before assigning it to clientdataset.Data. Assigning an empty OLEVariant will
throw the mentioned exception.
--
Ralf Jansen
- Catastrophic failure with COM+ client Options
- C#调用OCX控件Catastrophic failure解决方法
- 解决 VC2012 ATL 多线程调用 报错:E_UNEXPECTED Catastrophic failure.
- DB2 client commond line options
- 创建SOAP Client的options参数解释
- 创建SOAP Client的options参数解释
- com.rabbitmq.client.ShutdownSignalException
- RESTful Java Client With RESTEasy Client Framework
- RESTful Java client with RESTEasy client framework
- High Availability options with Hadoop distributions
- 2.8 Grouping Compact Options with UISegmentedControl
- 2.11 Presenting Sharing Options with UIActivityViewController
- Configure with --host, --target and --build options
- com.mysql.jdbc.CommunicationsException: Communications link failure
- Predicting server hardware failure with mcelog
- ORA-15064: communication failure with ASM instance
- Reducing Link Failure Detection Time with BFD
- publickey,gssapi-with-mic,Unspecified GSS failure
- Oracle 左连接和右连接
- 数据源+freemarker+servlet生成xml文件
- wwwwwwwwwww
- 《C++高级编程》之--揭开C++I/O的神秘面纱
- 获取长度中英文有?td>
- Catastrophic failure with COM+ client Options
- 漂亮图骗新闻
- 防止页面刷新重复提交的方法
- ASP.NET配置文件Web.config 详细解释
- Tomcat 6 通过 JDBC 连接池连接 SQL Server 2000 和 MySQL 5 的设置
- WINDOWSXP主题风格美化教程
- gridview转Excel时 ,文件名为乱码的解决方法
- fileUpload选图片image中显示
- 设置自动关机