import jaydebeapi
# Path to the Solid JDBC driver JAR file
jdbc_driver_jar = "C:\\Solid\\SolidDriver2.0.jar"
# JDBC URL for connecting to Solid
jdbc_url = "jdbc:solid://xxxxcorpdb03.corporate.intra:1865/SOLDBC"
# JDBC driver class name
jdbc_driver_class = "com.solid.jdbc.SolidDriver"
# Database username and password
username = "xxxx"
password = "xxx"
# Establishing the connection using JayDeBeApi
print('point - 0')
try:
connection = jaydebeapi.connect(
jdbc_driver_class,
jdbc_url,
[username, password],
jdbc_driver_jar)
except Exception as e:
raise e
finally:
print ('finally')
print('point - 1')
cursor = connection.cursor()
print('point - 2')
cursor.execute("SELECT * FROM discount")
results = cursor.fetchall()
print(results)
cursor.close()
connection.close()
I am trying to connect to a solid DB using JDBC drivers and the program just prints "point - 0" and quits. I cannot do anything because the frustrating thing is it doesn't even raise exception so how can I understand what is wrong? If someone can at least guide me how to raise an exception it would be appreciated. Somehow the program is crashing in the connection.