Re: How to read a binary file into a mysql table

2007-12-18 Thread Hans Müller
Sorry, I found the mistake: There is more than one blob type, blob as a default stores only 64k of data. LONGBLOB has a 4G limit which is Ok for my purposes. Happy Christmas to all, Hans -- http://mail.python.org/mailman/listinfo/python-list

Re: How to read a binary file into a mysql table

2007-12-18 Thread Hans Müller
Hello, thanks a lot for the Binary(). This does the trick, now I can import all my binary data. But now I found the next problem: The Blob is now limited to 65535 Bytes. I love all these stone age (16bit) limits on my 64bit machines... All bigger files a truncated. Has someone an idea how to so

Re: How to read a binary file into a mysql table

2007-12-15 Thread Benoit
On Dec 14, 5:41 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Fri, 14 Dec 2007 12:19:41 -0300, Hans Müller <[EMAIL PROTECTED]> escribió: > > > I cannot read a binary file into a mysql database. Everything I tried > > did not succeed. > > > What I tried (found from various google lookups

Re: How to read a binary file into a mysql table

2007-12-14 Thread Gabriel Genellina
En Fri, 14 Dec 2007 12:19:41 -0300, Hans Müller <[EMAIL PROTECTED]> escribió: > I cannot read a binary file into a mysql database. Everything I tried > did not succeed. > > What I tried (found from various google lookups...) is this: > > con = MySQLdb.connect(to server) > cur = con.cursor() > >

How to read a binary file into a mysql table

2007-12-14 Thread Hans Müller
Good morning folks, I cannot read a binary file into a mysql database. Everything I tried did not succeed. What I tried (found from various google lookups...) is this: con = MySQLdb.connect(to server) cur = con.cursor() cur.execute("insert into data values('file1', %s)", (open("test.jpg", "rb