I want to connect from Python on Bluemix to dashDB on JDBC.

Asked 4 months ago, Updated 4 months ago, 9 views

import jaydebeapi
import jpe

jar='/opt/IBM/db2/V10.1/java/db2jcc4.jar'#location of the jdbc driver jar
args='-Djava.class.path=%s'%jar
jvm = jptype.getDefaultJVMPath()
jtype.startJVM(jvm,args)
jaydebeapi.connect('com.ibm.db2.jcc.DB2Driver', ['jdbc:db2://server:port/database', 'myusername', 'mypassword'])

There was someone who did well in , but how can I connect from Python on Bluemix to dashDB?

python

2022-09-30 11:22

1 Answers

I have never tried Python for a dashDB connection, but I have a sample dashDB in IBM DevOps Services below.Apparently, there is also a Python sample.

https://hub.jazz.net/project/ibmdatabase/dashDB/overview

If you look at the code, it says import ibm_db, so you seem to be using that module.


2022-09-30 11:22

If you have any answers or tips


© 2023 OneMinuteCode. All rights reserved.