473,327 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

MySQLdb error for sql >64K

JZ
I cannot execute insert data into TEXT field if that data is bigger than
64KB. :(
cursor.execute("INSERT INTO table (field) VALUES(%s) WHERE id=1", myValue)


Traceback (most recent call last):
File "<interactive input>", line 1, in ?
File "C:\opt\PYTHON~1\lib\site-packages\MySQLdb\cursors.py", line 95, in
execute
return self._execute(query, args)
File "C:\opt\PYTHON~1\lib\site-packages\MySQLdb\cursors.py", line 114, in
_execute
self.errorhandler(self, exc, value)
File "C:\opt\PYTHON~1\lib\site-packages\MySQLdb\connections.py", line 33,
in defaulterrorhandler
raise errorclass, errorvalue
Warning: Rows matched: 1 Changed: 0 Warnings: 1

The same sql query executed using MySQLFront client works without any
problems. So, I think the problem must be with MySQLdb 0.9.2 module.

Any suggestions?

--
JZ
Jul 18 '05 #1
1 1431
JZ wrote:
I cannot execute insert data into TEXT field if that data is bigger than
64KB. :(

cursor.execute("INSERT INTO table (field) VALUES(%s) WHERE id=1", myValue)

Traceback (most recent call last):
File "<interactive input>", line 1, in ?
File "C:\opt\PYTHON~1\lib\site-packages\MySQLdb\cursors.py", line 95, in
execute
return self._execute(query, args)
File "C:\opt\PYTHON~1\lib\site-packages\MySQLdb\cursors.py", line 114, in
_execute
self.errorhandler(self, exc, value)
File "C:\opt\PYTHON~1\lib\site-packages\MySQLdb\connections.py", line 33,
in defaulterrorhandler
raise errorclass, errorvalue
Warning: Rows matched: 1 Changed: 0 Warnings: 1

The same sql query executed using MySQLFront client works without any
problems. So, I think the problem must be with MySQLdb 0.9.2 module.

Any suggestions?

--
JZ


jz,
A MYSQL "text" type can be 0 to 65535 bytes; a "mediumtext"
type 2**8 times as big. Just a guess but maybe the failing
insert checks the sizes and the 'working' one just chops off
the excess. You could alter the column and try it fairly
easily.
wes

Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mario_5 | last post by:
I made a small application which print some JPanel content: .... disableDoubleBuffering(componentToBePrinted); componentToBePrinted.paint(graphics); enableDoubleBuffering(componentToBePrinted);...
0
by: Ilja Booij | last post by:
Hi all, I have set up master/slave replication between 2 servers (1 master, 1 slave). However, when I change a table on the master (e.g. by inserting a row), the same table on the slave is not...
1
by: Ike | last post by:
What object do I use for a blob that must be >64 k ?-Ike
2
by: razorfold | last post by:
Hi, I've written something that takes text and passes it to gpg to encrypt. It works great except when the text size is greater than 64k at which point PHP/Apache hangs. Is there any way around...
14
by: Stefan Mueller | last post by:
With the following code I can add a new row to an existing table. That really works great. Many thanks to all who helped me so far. But my problem is that the added cells do somehow not have the...
4
by: Anurag | last post by:
I feel really embarassed asking this. However, ask I will. When we say that: (1) "CLP in Db2 V8.2 still imposes a limit of 64K on the stored proc size; (2) "....If you use another client, such...
4
by: Jan | last post by:
I have a form with a large procedure in MS Access 2000. I had just added some more code and performed Compress and Repair when the following problem came up: When I try to open the procedue from...
16
by: network-admin | last post by:
We have Problems with Access query on Oracle 10g Database with ODBC Connection. The Query_1 is such as select * from xtable where ycolumn <"S" Result = ODBC Faild...
0
by: Rashid Karim | last post by:
I have a java application on java Swing, EJBs, Bea WebLogic, and Oracle. When I run a long query in batch, I get this message: java.sql.SQLException: Oracle cannot handle batched SQL > 64k...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.