Re: maxdb python inserting lobs

Daniel Dittmar <[email protected]>
Newsgroups gmane.comp.db.maxdb
Message-ID <[email protected]>
Luca Calderano wrote:
> Can someone explain me how to insert data into lob fields using the maxdb python interface?

Use prepared statements 
(http://dev.mysql.com/doc/maxdb/en/20/512a7c5647e64a863683cc6333617b/frameset.htm)

As the parameter passed to the execute method, you can use either
- a string: prepared.execute (['lob value'])
- the read method of a file object: prepared.execute ([open 
('somefile.txt', 'r').read])
   It should be the read method (open().read), not the result of the 
read call, which would place a large string in memory first.

Daniel


-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.