Com.ibm.db2.jcc.am.sqlexception Db2 Sql Error Sqlcode=-514
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about sqlcode=-516, sqlstate=26501 Stack Overflow the company Business Learn more about hiring developers or posting ads
The Describe Statement Does Not Specify A Prepared Statement
with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow
Sql_curlh200c1
is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up DB2 SQL Error: SQLCODE=-514, SQLSTATE=26501 up vote 1 down vote favorite When I
Sql Error: -516, Sqlstate: 26501
used JDBC to execute a prepared statement as following: select count(1) from TableName where col1 = 9 and col2 = ? it ocurred a DB2 SQL Error: SQLCODE=-514, SQLSTATE=26501, SQLERRMC=SQL_CURSH200C1, DRIVER=3.64.104. what's more, this problem doesn't come out everytime,sometimes it can query successfully. Could anyone tell me the reason for the problem, thanks very much! PS:DB2 version is 9.5 jdbc db2 share|improve this question edited Jul 31 '13 at 0:55 sql 204 asked Jul 30 '13 at 15:38 kingson 6113 Show the code how you prepare and execute the statement –Mark Rotteveel Jul 31 '13 at 10:41 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote Here's a link to the DB2 error codes, so you can look up your next error yourself. DB2 thinks that your select is using a cursor. Try select count(*) from TableName where col1 = 9 and col2 = ? and see if the error goes away. Here's the full explanation of the error from the IBM DB2 Error code manual. -514 THE CURSOR cursor-name IS NOT IN A PREPARED STATE Explanation The application program has tried to use a cursor, 'cursor-name,' that is not in a prepared state. The cursor is associated with a statement that: Was never prepared. Was invalidated by a commit or rollback operations System action The statement cannot be processed. Programmer response For case 1, ensure that you prepare the statement that is named in the DECLARE CURSOR statement for 'cursor-name' before you try to open the cursor. For case 2, take one of the following actions: Use the WITH HOLD option of DECLARE CURSOR. Do not execute a commit or roll
Data Management Pega Mobility User Interface Products Accessibility Framework Autonomic Event sqlcode=-551 Services (AES) Business Intelligence Exchange (BIX) Decision Strategy Manager error code: -104, sql state: 42601 Pega Cloud Pega Cloud Collaboration Services PegaSurvey Pega Web Mashup System Management sqlstate 42501 Application (SMA) Legacy Chordiant PegaDISTRIBUTION Manager PegaWORKS Products Predictive Analytics Director for PRPC Applications Pega Customer Service Pega Field Service Pega http://stackoverflow.com/questions/17951447/db2-sql-error-sqlcode-514-sqlstate-26501 Marketing Pega Sales Automation Applications by Industry Communications & Media Energy Financial Services Government Healthcare Insurance Life Sciences Manufacturing & High Technology Academy My Self-Study My Classroom Course Catalog New Pega 7.2 Core Curriculum Pega PASS Subscriptions My Certifications Verify Certification Learning Paths https://pdn.pega.com/support-articles/was-staleconnection-db2-sql-error-sqlcode-204-sqlstate42704 Contact Pega Academy Support Pega Support Product Support Community Pega Upgrade Center Downloads Pega 7 Personal Edition Licensed Software Pega 7 Update Software Hotfix Catalog Deployments & Upgrades Deployment Guides Pega 7 Platform Support Guide PRPC 5 & 6 Platform Support Guide Online Help Systems Large File Transfer Application Communities Customers Customer Success Program Pega Can Awards Customer Advisory Board Resources PegaTube Pega TechTalk Pega Exchange Business Architect Central Pega Sites Search form Search Sign InContact Us Sign In × Status message You must login to access this content. Email: Password: Sign In Forgot password?Don't have an account?Create one US: +1 (617) 374 9600 UK: +44(0) 118 9591150 Australia: +61 2 9581 7000 Contact Us Privacy & Security Terms of Use Trademarks ©2016 Pegasystems Inc.
Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.