← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #242920]: Issue when accessing to MySQL database

 

Question #242920 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/242920

RaiMan proposed the following answer:
another option is to use the following line in another bat:

java -cp "%cp%;--ref-to-sikuli-jar--" org.python.util.jython

this will start an interactive Jython session, where you could enter
Jython stuff line by line and might find out this way, what's wrong

and for the script I would recommend this sequence:

from com.ziclix.python.sql import zxJDBC

j = 'jdbc:mysql://localhost:3306/BinckAutoTest'
u = 'root'
p = 'mypassword'
m = 'com.mysql.jdbc.Driver'

try:
  con = zxJDBC.connect(j, u, p, m)
except Exception, e:
  print "database connection issue : ", e
  exit()
from sikuli import *

So Sikuli stuff is only touched, if the connection is successful.

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