← Back to team overview

sikuli-driver team mailing list archive

[Question #685471]: [error] zxJDBC.DatabaseError ( driver [org.postgresql.Driver] not found )

 

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

Hi. 

I have been using the below function in version 1.1.3 for quite a while with no issues.

def SQL(DB,User,PSW,SQL):
    load("C:/SikuliX/postgresql-42.1.4.jar")
    from com.ziclix.python.sql import zxJDBC

    jdbc_url = DB
    username = User
    password = PSW
    driver = "org.postgresql.Driver"

    # Obtain a Connection Using the With-Statement
    with zxJDBC.connect(jdbc_url, username, password, driver) as conn:
        with conn:
            with conn.cursor() as c:
                c.execute(SQL) 

SQLQ(POSTGRESQL_MMA_jdbc_url,POSTGRESQL_MMA_Username,POSTGRESQL_MMA_Password,SQL,SQLAssert)

But After Sikuli 2.0.0 I receive the following error message:

[error] script [ Palette4 ] stopped with error in line 39
[error] zxJDBC.DatabaseError ( driver [org.postgresql.Driver] not found )
[error] --- Traceback --- error source first
line: module ( function ) statement 
16: main (  SQLQ )     driver = "org.postgresql.Driver"
39: main (  <module> )     SQLQ(POSTGRESQL_MMA_jdbc_url,POSTGRESQL_MMA_Username,POSTGRESQL_MMA_Password,SQL,SQLAssert)
[error] --- Traceback --- end --------------

Please please assist or advise.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.