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 Index » WebSphere Message Broker (ACE) Support » Problem With using Type-1 driver in java compute node

Post new topic  Reply to topic
 Problem With using Type-1 driver in java compute node « View previous topic :: View next topic » 
Author Message
mahesh2069
PostPosted: Wed Jun 26, 2013 7:08 am    Post subject: Problem With using Type-1 driver in java compute node Reply with quote

Centurion

Joined: 26 Jun 2013
Posts: 103

Hi WMB Developers,

I want to connect with Database through type-1 driver in java compute node. But I got error when debug control reach getting connection object.Same code executed successfully in Java.

When I use type-4 driver it works correctly.


Code:

      try
25     {
26       Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
     Connection        con=DriverManager.getConnection("jdbc:odbc:OracleDSN");
Statement st=con.createStatement();
28       ResultSet res = st.executeQuery("select * from customer");
29       while (res.next())
30       {
31         System.out.print(res.getString(1));
32         System.out.print(res.getString(2));
33         System.out.print(res.getString(3));
34         System.out.println(res.getString(4));
35       }
36       res.close();
37       con.close();
38     }
39     catch (Exception e)
40     {
41       System.out.println("Error in fetching data" + e);
42     }
43   }
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Jun 26, 2013 7:12 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

And yet Broker docs specifically state that you can only use Type 4 drivers.

Why do you want to use a Type 1 Driver from JDBC, rather than using an ODBC connection from a Java Compute node (an MBSQLStatement object).
Back to top
View user's profile Send private message
mahesh2069
PostPosted: Wed Jun 26, 2013 9:50 am    Post subject: Wishes Reply with quote

Centurion

Joined: 26 Jun 2013
Posts: 103

Thank you buddy..

While using MbSQLStatement I can connect with DSN..

I have problem in use of MbGlobalMap...
When I got instance the MbGlobalMap, at that statement exception rise ..
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jun 26, 2013 10:29 am    Post subject: Re: Wishes Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mahesh2069 wrote:
I have problem in use of MbGlobalMap...
When I got instance the MbGlobalMap, at that statement exception rise ..


Which you reference here
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Problem With using Type-1 driver 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.