Author |
Message
|
amitkarma |
Posted: Thu Feb 06, 2020 7:14 am Post subject: Resultset in Java compute node |
|
|
Novice
Joined: 17 Feb 2013 Posts: 10
|
I have requirement
I'm trying to retrieve database result via MBSQLStatement and want to map to ResultSet object to process data further.
Is is possible or is there any other way around? |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Feb 06, 2020 8:24 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Moved to Broker forum. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
timber |
Posted: Thu Feb 06, 2020 12:06 pm Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Please explain what the message flow needs to do - without that information it will be difficult to give any useful advice. |
|
Back to top |
|
 |
amitkarma |
Posted: Fri Feb 07, 2020 1:39 am Post subject: |
|
|
Novice
Joined: 17 Feb 2013 Posts: 10
|
The JCN has JDBC connection but we are changing to ODBC using MBSQLStatement.
MbSQLStatement state = createSQLStatement( "DSN_test",qur1+qur2,MbSQLStatement.SQL_TRANSACTION_AUTO);
MbMessageAssembly newAssembly = new MbMessageAssembly(assembly, assembly.getMessage());
state.select(assembly,newAssembly)
resultSet= (ResultSet)newAssembly;
where resultset is object type of ResultSet
and it is giving error
com.ibm.broker.plugin.MbMessageAssembly incompatible with java.sql.ResultSet", |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Feb 07, 2020 1:46 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
amitkarma wrote: |
The JCN has JDBC connection but we are changing to ODBC using MBSQLStatement.
MbSQLStatement state = createSQLStatement( "DSN_test",qur1+qur2,MbSQLStatement.SQL_TRANSACTION_AUTO);
MbMessageAssembly newAssembly = new MbMessageAssembly(assembly, assembly.getMessage());
state.select(assembly,newAssembly)
resultSet= (ResultSet)newAssembly;
where resultset is object type of ResultSet
and it is giving error
com.ibm.broker.plugin.MbMessageAssembly incompatible with java.sql.ResultSet", |
Bad use of MBSQLStatement. Look at the example https://www.ibm.com/support/knowledgecenter/en/SSMKHH_10.0.0/com.ibm.etools.mft.doc/ac30494_.html#ac30494_2  _________________ MQ & Broker admin |
|
Back to top |
|
 |
amitkarma |
Posted: Fri Feb 07, 2020 2:05 am Post subject: |
|
|
Novice
Joined: 17 Feb 2013 Posts: 10
|
I checked it as well, but it did not solve my problem. |
|
Back to top |
|
 |
timber |
Posted: Fri Feb 07, 2020 3:04 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Two important questions:
1. Do you know what an MbAssembly is, and how to use it?
2. Why did you think that MbAssembly could be cast to ResultSet? |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Feb 07, 2020 6:17 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
amitkarma wrote: |
I checked it as well, but it did not solve my problem. |
Then I also hope you checked this and read carefully Timber's post. You seem to think java is java when running in a Java Compute Node. You have still a lot to learn and maybe it is time to get some formal training ...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|