Solved

DB2 Error

Posted on 2010-11-26
3
1,287 Views
Last Modified: 2012-05-10
[IBM][CLI Driver][DB2] SQL0514N The cursor "SQLCUR4" is not in a prepared state. SQLSTATE=26501

I get the following error when trying to retrieve data what is the solution

Thanks.
0
Comment
Question by:raheis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 9

Accepted Solution

by:
AnilKumarSharma earned 500 total points
ID: 34216802
Your SQLSTATE code tells the problem.
 
It starts with 26 that is it belongs to class code 26, and Class Code 26 belongs to Invalid SQL Statement Identifier.
So  Class Code 26: Invalid SQL Statement Identifier SQLSTATE Value       
The 501 one is specific error meaning - The statement identified does not exist.

To get more information, please check
http://support.microsoft.com/kb/321002

If above doesn't help then to get more insight, Please provide your DB2 version, platform, and the exact command you are running. Are you exporting between different OS filesystem?

0
 
LVL 37

Expert Comment

by:momi_sabag
ID: 34217488
CAN you post your code here?
0
 

Author Closing Comment

by:raheis
ID: 34217935
Hello Thanks for the quick response, after debugging found that columns being selected dont exist in the TEST environment.
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question