← Back to team overview

sikuli-driver team mailing list archive

[Question #202408]: using jdbc driver in Sikuli script

 

New question #202408 on Sikuli:
https://answers.launchpad.net/sikuli/+question/202408

I'm trying to make a connection in Sikuli script with a MySQL database. 
(First (after of course creating the database, downloading and installing the driver....) set the classpath)

My code:

from com.ziclix.python.sql import zxJDBC
jdbc_url = 'jdbc:mysql://localhost:3306/BinckAutoTest'
username = 'root'
password = 'password'
MySQLDriver = 'com.mysql.jdbc.Driver' 
urldb = zxJDBC.connect(jdbc_url, username, password, MySQLDriver)
#do something with it
..
..

I get in return:
zxJDBC.DatabaseError: driver [com.mysql.jdbc.Driver] not found

I followed the Jython documentation and this should work.
Does Sikuli handle tar files differently then normal Jython(does it, for example, ignore the classpath)?
If so, how do I make my driver known in Sikuli?

I'm new at the Java/Jython/Sikuli business so If there is something really simple that I couldn't have missed, please say it because I probably did.

Thanks

Dave

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.