开发者

DB2DataAdapter.Fill(dataset) throws error "SQL0901N (Reason "CPF4273".) SQLSTATE=58004"

开发者 https://www.devze.com 2023-04-12 19:58 出处:网络
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

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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号