Error 204 Sql
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings
Sql Error 203
and policies of this site About Us Learn more about Stack Overflow sql error 304 the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags sql error 208 Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only http://www.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/codes/src/tpc/n204.html takes a minute: Sign up Why do I get SQLCODE=-204, SQLSTATE=42704 with DB2 LUW and WebSphere App Server? up vote 3 down vote favorite There are numerous web pages where people show this message as a symptom (with the value after SQLERRMC and the driver level varying): DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=M51Dev.CUSTOMER, DRIVER=3.61.65 including several here on StackOverflow. The http://stackoverflow.com/questions/24144538/why-do-i-get-sqlcode-204-sqlstate-42704-with-db2-luw-and-websphere-app-server error codes mean that an object -- nearly always a table -- is not found, and the value of the SQLERRMC parameter contains the name of the object in question. In every other occurrence of this I can find, the solution was just that they needed to qualify the table name with the schema name. However, as you can see from the line above, that isn't the case here. The schema is M51Dev, and the table is CUSTOMER, and both of them exist. The environment is WebSphere Application Server (7.0.0.31 in this particular case, but I somehow doubt that's relevant) running on Windows Server 2003 R2, with DB2 9.7.300.3885 on an old XP machine. The datasource is defined in WAS and retrieved via JNDI. the application is written in Java, and our SQL is executed using JDBC via Spring's JdbcTemplates. The datasource definition in WAS includes a custom property called currentSchema, which is set to M51Dev. This is the relevant line of SQL (or one of them, as we get the same symptom for every table): SELECT rundateOverride FROM cust
be sure to check out the FAQ by clicking the link above. You may have to register before you can http://www.dbforums.com/showthread.php?1673040-Getting-error-SQLCODE-204-SQLSTATE-42704 post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 15 of 15 Thread: Getting error SQLCODE:-204 SQLSTATE:42704 Tweet Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch sql error to Hybrid Mode Switch to Threaded Mode 12-29-11,03:49 #1 dubeyanurodh View Profile View Forum Posts Registered User Join Date Dec 2011 Posts 7 Unanswered: Getting error SQLCODE:-204 SQLSTATE:42704 Hi, I am facing issue accessing db2 table. getting SQLCODE: -204 SQLSTATE: 42704. I am able to access same table from command line but not through JDBC. error 204 sql Other tables in same schema are accessible but tables which are created at run time are not accessible. not sure whether it is DB2 or JDBC issue. DB2 version is 9.5 and OS is AIX. Can any one please help me out. Thanks in advance. Reply With Quote 12-29-11,04:02 #2 tonkuma View Profile View Forum Posts Registered User Join Date Feb 2008 Location Japan Posts 3,483 Please see 2) in http://www.dbforums.com/db2/854783-m...e-posting.html tables which are created at run time Publish complete statements to create the tables. and may be more information neccesary, depending on your response ... Reply With Quote 12-29-11,04:49 #3 dubeyanurodh View Profile View Forum Posts Registered User Join Date Dec 2011 Posts 7 Here is command I am using to create table: create table schemaName.tblName(field1 varchar(2),field2 varchar(30)); I am able to access this through following command: db2 "select * from schemaName.tblName" but with JDBC it give SQLCODE=-204 SQLSTATE:42704. Reply With Quote 12-29-11,09:25 #4 stolze View Profile View Forum Posts Visit H