If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Use JDBC to connect to arbitrary DB from java stored procedure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-13-11, 08:12
Panoptical Panoptical is offline
Registered User
 
Join Date: Apr 2011
Posts: 3
Use JDBC to connect to arbitrary DB from java stored procedure

Is it possible to use JDBC to connect to an arbitrary DB, say Mysql, from inside a java stored procedure in db2 9 express? I am asking because in the documentation it says: "Connection level APIs cannot be called from within external functions or external methods." and I have no idea what this is supposed to mean.
Where would I put the mysql jdbc driver jar file? Can I upload it using the jar uploader stored procedure?
Reply With Quote
  #2 (permalink)  
Old 04-13-11, 08:17
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
No, you cannot do that.
Reply With Quote
  #3 (permalink)  
Old 04-14-11, 04:46
Panoptical Panoptical is offline
Registered User
 
Join Date: Apr 2011
Posts: 3
yes, you can

I tried it with mysql. It works.
Reply With Quote
  #4 (permalink)  
Old 04-14-11, 09:07
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by Panoptical View Post
I tried it with mysql. It works.
Wasn't your question about DB2 9 Express Edition?
Reply With Quote
  #5 (permalink)  
Old 04-15-11, 04:42
Panoptical Panoptical is offline
Registered User
 
Join Date: Apr 2011
Posts: 3
Yes. I created a java stored procedure on a DB2 Express-C which connects to a mysql database using jdbc.
Would this not work on a DB2 Express (without the C)?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On