ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexWebSphere Message Broker SupportResultset in Java compute node

Post new topicReply to topic
Resultset in Java compute node View previous topic :: View next topic
Author Message
amitkarma
PostPosted: Thu Feb 06, 2020 7:14 am Post subject: Resultset in Java compute node Reply with quote

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
View user's profile Send private message
bruce2359
PostPosted: Thu Feb 06, 2020 8:24 am Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 8709
Location: US: west coast, almost. Otherwise, enroute.

Moved to Broker forum.
_________________
My life flows on in endless song;
How can I keep from singing?
Back to top
View user's profile Send private message
timber
PostPosted: Thu Feb 06, 2020 12:06 pm Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1116

Please explain what the message flow needs to do - without that information it will be difficult to give any useful advice.
Back to top
View user's profile Send private message
amitkarma
PostPosted: Fri Feb 07, 2020 1:39 am Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Fri Feb 07, 2020 1:46 am Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20297
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
View user's profile Send private message Send e-mail
amitkarma
PostPosted: Fri Feb 07, 2020 2:05 am Post subject: Reply with quote

Novice

Joined: 17 Feb 2013
Posts: 10

I checked it as well, but it did not solve my problem.
Back to top
View user's profile Send private message
timber
PostPosted: Fri Feb 07, 2020 3:04 am Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1116

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
View user's profile Send private message
fjb_saper
PostPosted: Fri Feb 07, 2020 6:17 am Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20297
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
View user's profile Send private message Send e-mail
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportResultset in Java compute node
Jump to:



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.