connection with the mysql database

Asked by CAMILO CARDOSO ALVES

Guys, I'm not getting sikuli to communicate with the database and capture values ​​and attach them to variables. Can anyone help me? Would you have an example of a connection with the mysql database?

Question information

Language:
English Edit question
Status:
Expired
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

Looking for scripting solutions with SikuliX you always have to keep in mind, that though you are scripting in Python language (level 2.7), the interpreter is Jython. So for features not included with SikuliX you have to look for Jython solutions.

One of these features is sql connection/use.
To get a deeper understanding:
https://jython.readthedocs.io/en/latest/DatabasesAndJython/

main topics:

1. have a driver jar on class path at runtime and use the IDE this way from commandline
java -cp <sql-driver>.jar;sikulix-ide....jar org.sikuli.ide.Sikulix ... parameter ...

Where to get suitable driver jars see the above mentioned information or the net.

2. in the script import the sql wrapper:
from com.ziclix.python.sql import zxJDBC

with 2.0.5+ the import from future is no longer needed.

Revision history for this message
RaiMan (raimund-hocke) said :
#2

no feedback