Author |
Message
|
nits_018 |
Posted: Fri Dec 21, 2012 1:01 am Post subject: Accessing database using JDBC in Java without using JCN. |
|
|
Apprentice
Joined: 24 Oct 2012 Posts: 34
|
Hello,
I would like to have a java file which will access the database using a JDBC. I am new to broker and java too. It wil be great if you guys can provide me some basic steps tht need to be followed while creating a JDBC connection in WMB. Any pdfs or links will also do. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Dec 21, 2012 6:07 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
JosephGramig |
Posted: Fri Dec 21, 2012 8:20 am Post subject: |
|
|
 Grand Master
Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA
|
Read this and all of its subsections as a starter. There is a section of DB interactions which will all be JDBC. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Dec 21, 2012 9:41 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Once you have that java file, what do you expect to do with it?
Run it inside broker, or outside?
If you choose to run it inside broker, how do you plan to access it if you are *not* using a JavaCompute node? What kind of node do you expect to be able to access it from? |
|
Back to top |
|
 |
nits_018 |
Posted: Wed Dec 26, 2012 11:44 pm Post subject: JDBC Connection issue |
|
|
Apprentice
Joined: 24 Oct 2012 Posts: 34
|
@mqjeff I will run it inside the broker by calling externally the Java function of a particular class.
Anyways i have found the solution: I was not able to load the driver class for JDBC and now i am able to do it with the following commands:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") ;
Thank you guys for all your help. |
|
Back to top |
|
 |
|