Im not sure this is a bug with the plugin code, but its also a for-info issue:-
I have confluence 2.3 running fine. I got the sql plugin up and running with jboss datasources and the following works fine
{sql:dataSource=java:ConfluenceDS}
select * from ATTACHMENTS{sql}
If I try and do more, eg:
{sql:dataSource=java:ConfluenceDS}
select count from CONF.ATTACHMENTS group by contenttype{sql}
I get an error:
sql: com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -243, SQLSTATE: 36001, SQLERRMC: SQL_CURSH200C1
select count from ATTACHMENTS group by contenttype
if (sensitivity.equalsIgnoreCase("insensitive")) {
System.out.println("creating a TYPE_SCROLL_INSENSITIVE cursor");
s = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY);
} else {
System.out.println("creating a TYPE_SCROLL_SENSITIVE cursor");
s = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_READ_ONLY);
}
Is this specific to DB2? or is DB2 just being picky? Would making the statement scroll insensitive affect other dbs?
I've got a copy of the code and hope to play with this, If you have any input Im all ears!
Description
Im not sure this is a bug with the plugin code, but its also a for-info issue:-
I have confluence 2.3 running fine. I got the sql plugin up and running with jboss datasources and the following works fine
{sql:dataSource=java:ConfluenceDS}
select * from ATTACHMENTS{sql}
If I try and do more, eg:
{sql:dataSource=java:ConfluenceDS}
select count from CONF.ATTACHMENTS group by contenttype{sql}
I get an error:
sql: com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -243, SQLSTATE: 36001, SQLERRMC: SQL_CURSH200C1
select count from ATTACHMENTS group by contenttype
From http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/rzala/rzalaco.htm
I get 'A SENSITIVE cursor cannot be defined for the specified select-statement.', leading to
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/rzaha/Sensitive2.htm?resultof=%22%43%75%72%73%6f%72%22%20%22%63%75%72%73%6f%72%22%20%22%53%65%6e%73%69%74%69%76%69%74%79%22%20%22%73%65%6e%73%69%74%22%20%22%45%78%63%65%70%74%69%6f%6e%22%20%22%65%78%63%65%70%74%22%20
Pertienent code being:
if (sensitivity.equalsIgnoreCase("insensitive")) {
System.out.println("creating a TYPE_SCROLL_INSENSITIVE cursor");
s = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY);
} else {
System.out.println("creating a TYPE_SCROLL_SENSITIVE cursor");
s = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_READ_ONLY);
}
Is this specific to DB2? or is DB2 just being picky? Would making the statement scroll insensitive affect other dbs?
I've got a copy of the code and hope to play with this, If you have any input Im all ears!
Just saw this now... must have missed it in my email.
Yes, scroll sensitive was put in a while ago to support horizontal row data.
May need to make that optional or something...don't know. I will investigate more later.
Bob Swift - 26/Jan/07 06:34 PM Just saw this now... must have missed it in my email.
Yes, scroll sensitive was put in a while ago to support horizontal row data.
May need to make that optional or something...don't know. I will investigate more later.
I think it is database dependent. Works ok on db2 for i5 and others.
I am thinking I should change to INSENSITIVE and also condition the setting of these parameters only if a scrollable cursor is needed.
Bob Swift - 27/Jan/07 05:30 PM I think it is database dependent. Works ok on db2 for i5 and others.
I am thinking I should change to INSENSITIVE and also condition the setting of these parameters only if a scrollable cursor is needed.
Yes, scroll sensitive was put in a while ago to support horizontal row data.
May need to make that optional or something...don't know. I will investigate more later.