How to read/write blobs with mysqldb?

Discussion in 'Python' started by Christopher J. Bottaro, Jan 8, 2005.

  1. First off, writing the blob. From what I gather on the internet, I'm
    suppose to read the entire file into memory (a Python string), then create
    a dbiRaw object with that string and use the dbiRaw object in an insert
    statement?

    That doesn't sound very efficient to me. What if my computer only has 64 MB
    of memory and the data I want to insert is 128 MB?

    It seems like there should be a way to read part of the data, insert that
    part into the DB, then get the next part, append, etc.

    Also, what if you are inserting a huge piece of data, like a GB, and you
    want to have a progress bar in your UI? How would you do that if you
    couldn't split up the insert statements?

    Thanks for the help.
     
    Christopher J. Bottaro, Jan 8, 2005
    #1
    1. Advertising

  2. Christopher J. Bottaro

    Paul Rubin Guest

    "Christopher J. Bottaro" <> writes:
    > That doesn't sound very efficient to me. What if my computer only has 64 MB
    > of memory and the data I want to insert is 128 MB?


    Don't use such large blobs.
     
    Paul Rubin, Jan 8, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ken

    Reading Blobs From Oracle

    Ken, Dec 20, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    6,617
    Mahesh ChandraMouli[MVP]
    Dec 20, 2003
  2. .Net Newbie

    Problem with Blobs

    .Net Newbie, Aug 24, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    312
    .Net Newbie
    Aug 24, 2004
  3. .Net Newbie
    Replies:
    0
    Views:
    314
    .Net Newbie
    Aug 24, 2004
  4. BinaryWriting Excel Blobs

    , Sep 26, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    407
  5. =?Utf-8?B?SnVuaW9yUHJvZ3JhbW1lcg==?=

    Reading Blobs from SQL and using it in an Image control of a webfo

    =?Utf-8?B?SnVuaW9yUHJvZ3JhbW1lcg==?=, Mar 19, 2006, in forum: ASP .Net
    Replies:
    9
    Views:
    468
    =?Utf-8?B?SnVuaW9yUHJvZ3JhbW1lcg==?=
    Mar 20, 2006
Loading...

Share This Page