Db2 Sql Error Sqlcode=-270 Sqlstate=42997
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 db2 sql error sqlcode 407 sqlstate 23502 Us Learn more about Stack Overflow the company Business Learn more about hiring db2 sql error sqlcode 440 sqlstate 42884 developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join db2 sql error sqlcode 551 sqlstate 42501 the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up DB2 query error during the http://www.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/codes/src/tpc/n270.html retrieval of a CLOB field up vote 1 down vote favorite From Java I am doing the following query on DB2: SELECT * FROM PRV_PRE_ACTIVATION WHERE TRANSACTION_ID = ? The field TRANSACTION_ID is a VARCHAR of length 32. I set the parameter in the preparedStatement using the setString method. I get the error: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-270, SQLSTATE=42997, SQLERRMC=63, DRIVER=3.59.81 at com.ibm.db2.jcc.am.dd.a(dd.java:676) at com.ibm.db2.jcc.am.dd.a(dd.java:60) at http://stackoverflow.com/questions/12686832/db2-query-error-during-the-retrieval-of-a-clob-field com.ibm.db2.jcc.am.dd.a(dd.java:127) at com.ibm.db2.jcc.am.bn.c(bn.java:2546) at com.ibm.db2.jcc.am.bn.d(bn.java:2534) at com.ibm.db2.jcc.am.bn.a(bn.java:2026) at com.ibm.db2.jcc.t4.cb.g(cb.java:140) at com.ibm.db2.jcc.t4.cb.a(cb.java:40) at com.ibm.db2.jcc.t4.q.a(q.java:32) at com.ibm.db2.jcc.t4.rb.i(rb.java:135) at com.ibm.db2.jcc.am.bn.gb(bn.java:1997) at com.ibm.db2.jcc.am.cn.pc(cn.java:3009) at com.ibm.db2.jcc.am.cn.b(cn.java:3786) at com.ibm.db2.jcc.am.cn.bc(cn.java:678) at com.ibm.db2.jcc.am.cn.executeQuery(cn.java:652) Where the sqstate means "Capability is not supported by this version of the DB2 application requester, DB2 application server, or the combination of the two." But I don't use any strange functionality. I have tried using an squ client the query: SELECT * FROM PRV_PRE_ACTIVATION where transaction_id='A' And it goes ok. What is the cause of the problem? UPDATE: The code where the statement is prepared: s = con.prepareStatement(sSQL, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE); sql database jdbc db2 clob share|improve this question edited Oct 2 '14 at 21:23 asked Oct 2 '12 at 8:25 Vitalij Zadneprovskij 1,66221731 can you show the code where you initialize the preparedStatement –user1406062 Oct 2 '12 at 10:12 @HussainAl-Mutawa I added that code –Vitalij Zadneprovskij Oct 2 '12 at 12:48 Can you execute "SELECT * FROM PRV_PRE_ACTIVATION" from your Java code? Your problem might be a connection problem, rather than an SQL problem. –Gilbert Le Blanc Oct 2 '12 at 12:57 @GilbertLeBlanc yes, I execute many other queries on the
help others com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: https://samebug.io/exceptions/105766/com.ibm.db2.jcc.am.SqlSyntaxErrorException/db2-sql-error-sqlcode-270-sqlstate42997-sqlerrmc63 SQLCODE=-270, SQLSTATE=42997, SQLERRMC=63, DRIVER=3.59.81 Stack Overflow | Vitalij Zadneprovskij | 4 years ago 0 mark DB2 query error during the retrieval of a CLOB field https://issues.apache.org/jira/browse/OPENJPA-1869 Stack Overflow | 4 years ago | Vitalij Zadneprovskij com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-270, SQLSTATE=42997, SQLERRMC=63, DRIVER=3.59.81 find similars IBM DB2 db2 sql 0 0 mark Parameterized sql in clause with variable number of arguments in DB2 Stack Overflow | 3 years ago | Vicky com.ibm.db2.jcc.am.SqlDataException: DB2 SQL Error: SQLCODE=-302, SQLSTATE=22001, SQLERRMC=null, DRIVER=3.59.81 find similars IBM DB2 Spring Framework 0 0 mark javax.transaction.RollbackException Stack Overflow | 6 years ago | db2 sql error Sharad Ahire javax.transaction.RollbackException find similars IBM DB2 0 Speed up your debug routine! Automated exception search integrated into your IDE Test Samebug Integration for IntelliJ IDEA 0 mark DB2 SQL Error: SQLCODE=-270 exception thrown by jpa paging item reader Stack Overflow | 1 year ago | Cheeta com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-270, SQLSTATE=42997, SQLERRMC=63, DRIVER=3.61.65 find similars IBM DB2 0 0 mark jbossesb.esb can't be deployed because of SqlSyntaxErrorException https://bugzilla.redhat.com/bugzilla/ | 5 years ago | Filip Elias com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-401, SQLSTATE=42818, SQLERRMC==, DRIVER=4.12.55 find similars IBM DB2 JBoss Application Server Connector Hibernate 0 See more Not finding the right solution? Take a tour to get the most out of Samebug. Tired of useless tips? Automated exception search integrated into your IDE Test Samebug Integration for IntelliJ IDEA Root Cause Analysis com.ibm.db2.jcc.am.SqlSyntaxErrorException DB2 SQL Error: SQLCODE=-270, SQLSTATE=42997,
error / updateClob must not select clob with a cursor in DB2Agile Board ExportXMLWordPrintableJSON Details Type: Bug Status: Open Priority: Major Resolution: Unresolved Affects Version/s: 2.0.1 Fix Version/s: None Component/s: jdbc Labels: None Environment: DB2 9.5 LUW Description I am trying to persist a streaming lob as written in the documentation. When I flush my session, I get the following: Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: DB2 SQL Error: SQLCODE=-270, SQLSTATE=42997, SQLERRMC=53, DRIVER=3.58.82 {prepstmnt 27511927 SELECT t0.GMRU_LOG, t0.GMRU_NAME FROM MEASURES.GMRU_GO_METER_RUN t0 WHERE t0.GMRU_NAME = ? FOR READ ONLY WITH RS USE AND KEEP UPDATE LOCKS [params=?]} [code=-270, state=42997] According to : http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.apdv.java.doc/doc/tjvrsush.htm it is not allowed to do a cursor fetch for lob attributes. However, this is done in order to ensure that there is a lock: public void updateClob { ... stmnt = sql.prepareStatement(conn, store.getFetchConfiguration(), ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); Issue Links relates to OPENJPA-1699 Streaming Lob support in DB2 Closed Activity All Comments Work Log History Activity Transitions There are no comments yet on this issue. People Assignee: Unassigned Reporter: Johannes Mathes Votes: 0 Vote for this issue Watchers: 0 Start watching this issue Dates Created: 02/Nov/10 20:41 Updated: 01/Dec/10 08:10 DevelopmentAgile View on Board Atlassian JIRA Project Management Software (v6.3.4#6332-sha1:51bc225) About JIRA Report a problem Powered by a free Atlassian JIRA open source license for Apache Software Foundation. Try JIRA - bug tracking software for your team. Atlassian