Login | Register
My pages Projects Community openCollabNet

Discussions > users > DBUtil

maxq
Discussion topic

Back to topic list

DBUtil

Author christophe blin <cblin at tennaxia dot com>
Full name christophe blin <cblin at tennaxia dot com>
Date 2005-05-20 02:44:17 PDT
Message Hi,

I have a different behavior of DBUtil between Windows XP Pro and Linux
(Fedora 3 or Mandrake 10).
All the data (maxq + script) are under a fat32 visible from win xp and
linuxes.
The database is under another Fedora 3 @ 192.168.0.253

Here is the code of test_dbutil.py (encoding: ISO-8859-15) :
<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<
from com.bitmechanic.maxq import DBUtil

db = DBUtil("org.gjt.mm.m​ysql.Driver",
"jdbc:mysql://192.16​8.0.253:3306/testlin​k", "root", "")

projid = db.loadVal("select id from project where name='T2 : Conformité
: plan fonctionnel'")
if projid == None:
    print "projid1:None"
else:
    print "projid1:"+projid

projid = db.loadVal("select id from project where name='T2 : Conformité
: plan fonctionnel'")
if projid == None:
    print "projid2:None"
else:
    print "projid2:"+projid
<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<
The ouput under windows xp pro (which is the expected output) :
$> MaxQ\maxq-0.98\bin\maxq.bat -r test_dbutil.py
20 mai 2005 11:28:54 com.bitmechanic.maxq.Main runTests
INFO: Running: test_dbutil.py
projid1:None
projid2:8
20 mai 2005 11:28:55 com.bitmechanic.maxq.Main runTests
INFO: OK
<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<
The ouput under Linux (Fedora 3 or Mandrake 10)
$ ./MaxQ/maxq-0.98/bin/maxq.sh -r test_dbutil.py
20 mai 2005 11:25:12 com.bitmechanic.maxq.Main runTests
INFO: Running: test_dbutil.py
projid1:None
projid2:None
20 mai 2005 13:25:12 com.bitmechanic.maxq.Main runTests
INFO: OK
<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<<<<<​<
Can someone explain me why there is a difference between the systems ?
I think this is an encoding problem but I do not see where : the JVM is
UTF8 under win and linux, the db does not change (so encoding of the db
is not the problem),
the jdbc driver is exactly the same...

Regards,
chris

« Previous message in topic | 5 of 11 | Next message in topic »

Messages

Show all messages in topic

RE: [maxq-users] problem building, can't find javac James Richards <James dot Richards at demandtec dot com> James Richards <James dot Richards at demandtec dot com> 2005-04-22 10:42:11 PDT
     Documentation: command line arguments christophe blin <cblin at tennaxia dot com> christophe blin <cblin at tennaxia dot com> 2005-05-18 08:31:03 PDT
         Re: [maxq-users] Documentation: command line arguments christophe blin <cblin at tennaxia dot com> christophe blin <cblin at tennaxia dot com> 2005-05-20 02:32:20 PDT
             Re: [maxq-users] Documentation: command line arguments oliverbock Oliver Bock 2005-05-24 00:41:16 PDT
         DBUtil christophe blin <cblin at tennaxia dot com> christophe blin <cblin at tennaxia dot com> 2005-05-20 02:44:17 PDT
             Re: [maxq-users] DBUtil christophe blin <cblin at tennaxia dot com> christophe blin <cblin at tennaxia dot com> 2005-05-20 04:33:02 PDT
                 Re: [maxq-users] DBUtil christophe blin <cblin at tennaxia dot com> christophe blin <cblin at tennaxia dot com> 2005-05-20 08:44:02 PDT
                     Re: [maxq-users] DBUtil saperski Marcin Cieslak 2005-05-20 10:07:09 PDT
                         Re: [maxq-users] DBUtil christophe blin <cblin at tennaxia dot com> christophe blin <cblin at tennaxia dot com> 2005-05-23 02:37:37 PDT
                             Re: [maxq-users] DBUtil saperski Marcin Cieslak 2005-05-23 14:06:30 PDT
                                 Re: [maxq-users] DBUtil christophe blin <cblin at tennaxia dot com> christophe blin <cblin at tennaxia dot com> 2005-05-24 02:14:30 PDT
Messages per page: