vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| hello, i am using db2jcc.jar from db2 udb v8.1 fix pack 2. (type 4 driver) i have this query select id, pono19, pono05, poqy38, pocd13 from xxxxxx.view ORDER BY pono19 ASC, pono05 ASC and get the error DB2 SQL error: SQLCODE: -243, SQLSTATE: 36001, SQLERRMC: SQL_CURSH200C17, statement = conn.createStatement( ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY); statement.executeQuery(sqlStr) i don't know why this error happened since i use this type of statement to execute query in the program everywhere. please help. so what is the right way to create a statement? |
| ||||
| Error message is pretty clear to me SQL0243N SENSITIVE cursor "<cursor-name>" cannot be defined for the specified SELECT statement. Explanation: Cursor "<cursor-name>" is defined as SENSITIVE, but the content of the SELECT statement requires DB2 to build a temporary result table of the cursor, and DB2 cannot guarantee that changes made outside this cursor will be visible. This situation occurs when the content of the query makes the result table read-only. For example, if the query includes a join, the result table is read-only. In this case, the cursor must be defined as INSENSITIVE or ASENSITIVE. The statement cannot be processed. User Response: Either change the content of the query to yield a result table that is not read-only, or change the type of the cursor to INSENSITIVE or ASENSITIVE. sqlcode : -243 sqlstate : 36001 PM "xixi" <dai_xi@yahoo.com> a écrit dans le message de news: c0f33a17.0308110920.55ba062a@posting.google.com... > hello, i am using db2jcc.jar from db2 udb v8.1 fix pack 2. (type 4 > driver) i have this query select id, pono19, pono05, poqy38, pocd13 > from xxxxxx.view ORDER BY pono19 ASC, pono05 ASC and get the error DB2 > SQL error: SQLCODE: -243, SQLSTATE: 36001, SQLERRMC: SQL_CURSH200C17, > > statement = > conn.createStatement( > ResultSet.TYPE_SCROLL_SENSITIVE, > ResultSet.CONCUR_READ_ONLY); > statement.executeQuery(sqlStr) > > i don't know why this error happened since i use this type of > statement to execute query in the program everywhere. please help. so > what is the right way to create a statement? |