Problem for extracting long text with zsql method?
Hi, I am having problem here. I am running Zope 2.0 in my machine with platform Win XP. I have succeed in connecting Zope to mysql database (which is currently held in another machine, Unix server) by using ZODBCDA-3.1.0b2-win32-py21. And A testing table called news has been created with following fields: +-------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+------------------+------+-----+---------+----------------+ | NID | int(10) unsigned | | PRI | NULL | auto_increment | | Name | varchar(100) | | | | | | Subject | varchar(255) | | | | | I then set up a very simple Zsql method as follow : select Name, Subject from news It works fine and will return all correct data only if the Subject value is not long, ie if Subject has value * This is just a test. It will work * This is just a test. This is just a test. This is just a test. This is just a test. This is just a test. This is just a test. This is just a test. Will return the following error Error, sql.error: None Because the news table is just for testing, it is rather small. It only has 5 rows of data in total. Hence, I have ruled out the possibility that the returning result is too big. But I could be wrong. It would be great help if someone could give me a direction to solve the above problem. Bonnie
b.nguyen@chime.ucl.ac.uk wrote at 2003-1-17 16:32 -0000:
I am running Zope 2.0 in my machine with platform Win XP. I have succeed in connecting Zope to mysql database (which is currently held in another machine, Unix server) by using ZODBCDA-3.1.0b2-win32-py21. You really mean Zope 2.0? This is incredibly old.
Try to upgrade to a modern version (2.5.1 or soon 2.6.1). Do not use "ZODBCDA". We know several problems with it. Use "ZmxODBCDA" or directly "ZMySQLDA". Dieter
b.nguyen@chime.ucl.ac.uk wrote:
I am running Zope 2.0 in my machine with platform Win XP. I have succeed in connecting Zope to mysql database (which is currently held in another machine, Unix server) by using ZODBCDA-3.1.0b2-win32-py21.
Why not just to ZMySQLDA (you'll need mysql-python too) directly: http://sourceforge.net/projects/mysql-python I'd echo Deiter's comments about upgrading to 2.5.1 or 2.6.0... cheers, Chris
Hi Chris, Thanks for the suggestions. Sorry for my typing mistake in my first email, I am actually using Zope 2.6.0. I have installed the suggested modules ZMySQLDA-2.0.8.tar.gz and MySQL-python- 0.9.2.win32-py2.2.exe. But I got the following error : Zope could not import Products.ZMySQLDA Traceback (innermost last): Module OFS.Application, line 541, in import_product Module Products.ZMySQLDA, line 91, in ? Module Products.ZMySQLDA.DA, line 92, in ? File Module Products.ZMySQLDA.db, line 89, in ? ImportError: No module named _mysql I have seen other people posted the same error message in the mail archives, but I didn't see a suitable solution for it. Would you have any idea? Anyway, if anyone has solve the problem, please email me. cheers, Bonnie On 20 Jan 2003 at 15:24, Chris Withers wrote:
b.nguyen@chime.ucl.ac.uk wrote:
I am running Zope 2.0 in my machine with platform Win XP. I have succeed in connecting Zope to mysql database (which is currently held in another machine, Unix server) by using ZODBCDA-3.1.0b2-win32-py21.
Why not just to ZMySQLDA (you'll need mysql-python too) directly: http://sourceforge.net/projects/mysql-python
I'd echo Deiter's comments about upgrading to 2.5.1 or 2.6.0...
cheers,
Chris
b.nguyen@chime.ucl.ac.uk wrote:
Module Products.ZMySQLDA, line 91, in ? Module Products.ZMySQLDA.DA, line 92, in ? File Module Products.ZMySQLDA.db, line 89, in ? ImportError: No module named _mysql
I have seen other people posted the same error message in the mail archives, but I didn't see a suitable solution for it. Would you have any idea?
This is a pretty old chesnut and one which I answered only last week. I suggest you google a little harder ;-) http://lists.zope.org/pipermail/zope/2003-January/129179.html ...and associated thread. The long and short of it is that mysql-python probably isn't installed in the right place. cheers, Chris
participants (3)
-
b.nguyen@chime.ucl.ac.uk -
Chris Withers -
Dieter Maurer