Issue 58446 - DB2 SQLCODE -243 on query against joined tables
Summary: DB2 SQLCODE -243 on query against joined tables
Status: UNCONFIRMED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 2.0
Hardware: PC Linux, all
: P3 Trivial with 4 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-25 14:58 UTC by boothcs
Modified: 2014-10-14 19:21 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description boothcs 2005-11-25 14:58:56 UTC
SUSE Linux 10 (32 bit) SUn JDK 1.5.0 DB2 ese 8.2.3 JDBC access via the jcc 
driver in type 2 mode. N.B. openoffice is the Novell build shipped with SUSE 10 
and subsequently updated from their site 
 
Any query that contains a join appears to fail with SQLCODE -243. I ran a JDBC 
trace and base was requesting sensitive and updateable resultset. I do not 
believe that this is allowed for joined tables. I have not been able to find a 
way of forcing base to make the query insensitive and read only which would 
resolve the problem 
 
A part of the JDBC trace from base follows and the sensitive and update request 
can be clearly seen. 
 
[ibm][db2][jcc][Time:1132748292377][Thread:Thread-2066][Connection@1bd4722] 
prepareStatement (SELECT DISTINCT "MACHINES"."MACHINE_ID", 
"MACHINES"."MANUFACTURER", "HOSTS"."HOST_NAME", "INSTANCES"."INSTANCE_NAME", 
"DATABASES"."DBNAME" FROM "DDBIDBI0"."INSTANCES" "INSTANCES", 
"DDBIDBI0"."HOSTS" "HOSTS", "DDBIDBI0"."MACHINES" "MACHINES", 
"DDBIDBI0"."DATABASES" "DATABASES" WHERE ( "INSTANCES"."HOST_ID" = 
"HOSTS"."HOST_ID" AND "HOSTS"."MACHINE_ID" = "MACHINES"."MACHINE_ID" AND 
"DATABASES"."INSTANCE_NAME" = "INSTANCES"."INSTANCE_NAME" ), 1005, 1008) called 
[ibm][db2][jcc][Time:1132748292377][Thread:Thread-2066][Connection@1bd4722] 
prepareStatement () returned PreparedStatement@45a877 
[ibm][db2][jcc][Time:1132748292377][Thread:Thread-2066]
[PreparedStatement@45a877] executeQuery () called 
[ibm][db2][jcc] [t4][time:1132748292378][thread:Thread-2066][tracepoint:5]
[Request.flush] 
[ibm][db2][jcc][t4]        SEND BUFFER: PRPSQLSTT              (ASCII)           
(EBCDIC) 
[ibm][db2][jcc][t4]        0 1 2 3 4 5 6 7   8 9 A B C D E F   0123456789ABCDEF  
0123456789ABCDEF 
[ibm][db2][jcc][t4] 0000   0058D05100010052  
200D00442113E8C3  .X.Q...R ..D!...  ..}...........YC 
[ibm][db2][jcc][t4] 0010   C4C4C4F0F0F34040  4040404040404040  ......@@@@@@@@@@  
DDD003           
[ibm][db2][jcc][t4] 0020   D5E4D3D3C9C44040  4040404040404040  ......@@@@@@@@@@  
NULLID           
[ibm][db2][jcc][t4] 0030   4040E2E8E2E2C8F2  F0F0404040404040  @@........@@@@@@    
SYSSH200       
[ibm][db2][jcc][t4] 0040   404040405359534C  564C303100010005  
@@@@SYSLVL01....      ...<.<...... 
[ibm][db2][jcc][t4] 0050   
2116F10005214604                    !....!F.          ..1.....         
[ibm][db2][jcc][t4]  
[ibm][db2][jcc][t4]        SEND BUFFER: SQLATTR                (ASCII)           
(EBCDIC) 
[ibm][db2][jcc][t4] 0000   0033D0530001002D  
2450000000002353  .3.S...-$P....#S  ..}......&...... 
[ibm][db2][jcc][t4] 0010   454E534954495645  2053544154494320  ENSITIVE 
STATIC   .+.............. 
[ibm][db2][jcc][t4] 0020   5343524F4C4C2046  4F52205550444154  SCROLL FOR 
UPDAT  ...|<<..|...&... 
[ibm][db2][jcc][t4] 0030   4520FF                              
E .               ...              
[ 
 
The following is a java application that uses the same OS/JDK/DB2 as base. It 
works with insensitive and read only 
 
It is possible that I have missed a feature of base and it will work but I 
can't find it.
Comment 1 christoph.lukasiak 2006-06-12 15:21:08 UTC
does it still occure in current version
(http://download.openoffice.org/680/index.html)?

thx
Comment 2 christoph.lukasiak 2006-06-12 16:40:34 UTC
set keyword 'needmoreinfo'
Comment 3 christoph.lukasiak 2006-07-04 15:14:51 UTC
lower prio
Comment 4 christoph.lukasiak 2006-08-21 14:07:25 UTC
tried with a current version src680m180 and queries with joins generally works fine
Comment 5 christoph.lukasiak 2006-08-21 14:08:41 UTC
no repro, no respond -> close

do not hestitate to reopen if still occure in current version and you have
anything to add
Comment 6 kango_v 2008-11-13 13:50:36 UTC
This is still happening.

Using Openoffice.org v3.0 - OOO300m9 (Build:9358)

Error:

SQL Status: 36001
Error code: -243
DB2 SQL error: SQLCODE: -243, SQLSTATE: 36001, SQLERRMC: SQL_CURSH200C1

The SQL command leading to this error is:

SELECT * FROM "ZCOREINV"."MASTPRD_CUSTFIELDS"

This is about as simple as it gets.  This is a simple view across two tables.
This works in eclipse datatools, db2 control center and my own java programs.

Can this issue be repopened please as it's still an issue.

Thanks
Comment 7 Frank Schönheit 2008-11-13 13:53:34 UTC
re-opening per kango_v's request. Can't confirm due to lacking DB2 access.
Comment 8 Frank Schönheit 2008-11-13 13:54:39 UTC
Removing needmoreinfo, as the bug description seems sufficient to reproduce when
you have access to the setup described above.
Comment 9 centurionkenshin 2009-07-13 20:57:24 UTC
Have the same problem.
Running on Ubuntu 8.10
Using JDBC driver for DB2.

Got following error:

SQL Status: 36001
Error code: -243

DB2 SQL Error: SQLCODE=-243, SQLSTATE=36001, SQLERRMC=SQL_CURSH200C2,
DRIVER=3.50.152

The data content could not be loaded.

SELECT "000_HM"."FILE_SN", "000_TEST"."DUMP0" FROM "000"."TEST" AS "TEST",
"000"."000_HM" AS "000_HM" WHERE "000_TEST"."ID" = "000_HM"."TESTID"
Comment 10 Mikael Hakman 2013-01-14 16:01:39 UTC
Whenever I try to access a DB2 View I receive the same SQLCODE -243. I'm running OpenOffice 3.4.1 on OS X 10.7.5. There is a free DB2 to download at IBM should you need it for problem investigation. Thanks.
Comment 11 DVC 2014-10-14 19:21:01 UTC
This is a problem on many queries. I ran into it trying to do column functions like count(), avg(), max(), min(), etc.

The solution is to modify the connection string. You need to add the following at the end
:cursorSensitivity=2;

In my case that means the Datasource URL becomes:
db2://andromeda:50000/ARBMAIN:cursorSensitivity=2;