Hello,
 
I have a litle problem.
I gif te code to explain my question.
 
# If I use Java.sql I can get what I need.
import java.sql as sql
import java.lang as lang
 
lang.Class.forName("org.gjt.mm.mysql.Driver")
con = sql.DriverManager.getConnection("jdbc:mysql://localhost/mydatabase","","")
stmt = con.createStatement()
word = 'canv'
rs = stmt.executeQuery("SELECT eng FROM mydatabase WHERE eng LIKE \"%s\" " % (woord + '%'))
while(rs.next()):
    print rs.getString("eng")
con.close();rs.close();stmt.close()
 
OUTPUT:
canvas
canvass
canvasser
# this is Oke..
 
# If I use the Python JDBC then NOT
from com.ziclix.python.sql import zxJDBC
db = zxJDBC.connect("jdbc:mysql://localhos/mydatabase", "" , "","org.gjt.mm.mysql.Driver")
c = db.cursor()
word = "canv"
c.execute("SELECT eng FROM mydatabase WHER eng LIKE (?) ", [word + '%'])
data = c.fetchall()
if data:
    for a in data:
        print a
db.close()
 
OUTPUT:
('canvas',)
('canvass',)
('canvasser',)
# and that I don't need.
 
I can't dispose the ('   ',) how com?
Is there a methode in the zxJDBC class that returns only the String.
Or is that te drifference between Java and Python
 
Thanks
 
Bennie,