Login | Register
My pages Projects Community openCollabNet

Discussions > users > Re: [maxq-users] MySQL

maxq
Discussion topic

Back to topic list

Re: [maxq-users] MySQL

Author hms_suprise
Full name john v hite
Date 2007-06-28 08:25:43 PDT
Message As always, thanks for posting, Oliver.

Dang, what an idiot I am, I have seen that before too. But no, I forgot
about that, probably because when I saw it I knew nothing of any flavor of
SQL. Did it slightly differently, after adding
mysql-connector-java​-5.0.6-bin.jar to the jar lib. But the snippet below
works.



from com.ziclix.python.sql import zxJDBC

class jdbc(PyHttpTestCase):
    def runTest(self):
            self.msg('Test started')

           d, u, p, v = "jdbc:mysql://localhost/", 'admin', 'data1',
"com.mysql.jdbc.Driver"
         db = zxJDBC.connect(d, u, p, v)
         #print 'db', db
         c = db.cursor()
         #print 'c', c
         c.execute("SELECT c.LastName FROM dvims_dbo.customer c")
         print 'desc', c.description
         for line in c.fetchall():
              print '~', line
         c.close()
         db.close()
         print 'done'

« Previous message in topic | 6 of 12 | Next message in topic »

Messages

Show all messages in topic

Configuring logging Hans Schwaebli <hans_schwaebli at yahoo dot com> Hans Schwaebli <hans_schwaebli at yahoo dot com> 2007-05-19 16:45:41 PDT
     Fw: Configuring logging Hans Schwaebli <hans_schwaebli at yahoo dot com> Hans Schwaebli <hans_schwaebli at yahoo dot com> 2007-05-19 17:55:06 PDT
         Re: [maxq-users] Fw: Configuring logging oliverbock Oliver Bock 2007-05-19 19:25:38 PDT
             MySQL hms_suprise john v hite 2007-06-27 08:13:59 PDT
                 Re: [maxq-users] MySQL oliverbock Oliver Bock 2007-06-27 15:49:48 PDT
                     Re: [maxq-users] MySQL hms_suprise john v hite 2007-06-28 08:25:43 PDT
                     Re: [maxq-users] MySQL hms_suprise john v hite 2007-06-28 08:41:48 PDT
                         Re: [maxq-users] MySQL oliverbock Oliver Bock 2007-06-29 04:31:09 PDT
                             Re: [maxq-users] MySQL dadan <dadan8_2003 at yahoo dot com> dadan <dadan8_2003 at yahoo dot com> 2007-09-10 01:20:06 PDT
                                 Re: [maxq-users] MySQL oliverbock Oliver Bock 2007-09-12 14:51:12 PDT
                                     Re: [maxq-users] MySQL dadan <dadan8_2003 at yahoo dot com> dadan <dadan8_2003 at yahoo dot com> 2007-09-13 17:47:35 PDT
                                     Re: [maxq-users] MySQL dadan <dadan8_2003 at yahoo dot com> dadan <dadan8_2003 at yahoo dot com> 2007-09-13 17:48:06 PDT
Messages per page: