DB2DataAdapter.Fill(dataset) 抛出错误“SQL0901N(原因“CPF4273”。)SQLSTATE=58004”

发布于 2024-12-10 08:22:12 字数 1197 浏览 0 评论 0原文

我的应用程序基于 Dot Net。我正在使用 VS 我的应用程序在其后端使用 IBm DB2。 我的查询是

SELECT A, B FROM SERVER.D WHERE A IN 
    (SELECT C FROM SERVER.E WHERE X = '01OBPP' AND Y= 'U' AND Z= '1')

服务器名称、D 和 E-表名称

PFB 代码-

DB2DataAdapter dbAdapter = null;
DB2Connection dbConn = null;
DB2Command dbCommand;
DataSet dsReturnDataSet  ;              
dbConn = new DB2Connection(connectionString);
if (dbConn.State == ConnectionState.Closed) dbConn.Open();
dsReturnDataSet.Clear();

dbCommand = GetCommand();
dbCommand.CommandText = queryString;
dbCommand.Connection = dbConn;
dbAdapter = new DB2DataAdapter((DB2Command)dbCommand);
dbAdapter.Fill(dsReturnDataSet);
return dsReturnDataSet;

GetCommand() 方法具有以下语句

DB2Command dbCommand; 
dbCommand = null;
dbCommand = new DB2Command();
dbCommand.CommandType = CommandType.Text;
dbCommand.CommandTimeout = 30;
return dbCommand;

A、B、C、X、Y、Z-列名称、服务器- 填充(dsReturnDataSet);'它在那里停留了很长一段时间,然后抛出错误

“错误 [58004] [IBM][AS] SQL0901N SQL 语句失败,因为 非严重的系统错误。可以处理后续的SQL语句。 (原因“CPF4273”。)SQLSTATE=58004”

请提供一些指示。 如果有人能够提供一些有关如何解决此错误的指示,我将非常感激。

My application is Dot Net based.I am using VS My application uses IBm DB2 at its backend.
My Query is

SELECT A, B FROM SERVER.D WHERE A IN 
    (SELECT C FROM SERVER.E WHERE X = '01OBPP' AND Y= 'U' AND Z= '1')

A,B,C,X,Y,Z-COLUMN NAME, SERVER- SERVER NAME, D AND E -TABLE NAME

PFB the code-

DB2DataAdapter dbAdapter = null;
DB2Connection dbConn = null;
DB2Command dbCommand;
DataSet dsReturnDataSet  ;              
dbConn = new DB2Connection(connectionString);
if (dbConn.State == ConnectionState.Closed) dbConn.Open();
dsReturnDataSet.Clear();

dbCommand = GetCommand();
dbCommand.CommandText = queryString;
dbCommand.Connection = dbConn;
dbAdapter = new DB2DataAdapter((DB2Command)dbCommand);
dbAdapter.Fill(dsReturnDataSet);
return dsReturnDataSet;

The GetCommand() method has the following statement

DB2Command dbCommand; 
dbCommand = null;
dbCommand = new DB2Command();
dbCommand.CommandType = CommandType.Text;
dbCommand.CommandTimeout = 30;
return dbCommand;

While it hits the line 'dbAdapter.Fill(dsReturnDataSet);' it stucks there for a very long time and after that it throws the error

"ERROR [58004] [IBM][AS] SQL0901N The SQL statement failed because of
a non-severe system error. Subsequent SQL statements can be processed.
(Reason "CPF4273".) SQLSTATE=58004"

Please provide some pointers.
i will be very grateful if any one can give some pointers as to hoW to solve this error.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

羞稚 2024-12-17 08:22:12

检查您的数据库日志。实例的 sqllib 目录下的 db2dump 目录中应该有一个 db2diag.log 文件。在此文件中搜索上述错误,它应该包含它所引用的根本原因(非严重系统错误)。

Check your database log. There should be a db2diag.log file in the db2dump directory under the instance's sqllib directory. Search this file for the above error and it should contain the root cause (that non-severe system error) that it refers to.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文