develooper Front page | perl.dbi.users | Postings from March 2008

Inserting LOB into DB2 in pieces

Thread Previous | Thread Next
From:
Bong Tumanut
Date:
March 6, 2008 20:25
Subject:
Inserting LOB into DB2 in pieces
I'm writing an Apache::ASP program to upload a file and store it in a LOB column in DB2.  Is there a way to store the uploaded file in pieces, i.e. 


while(read($filehandle, $data, 1024)) 
{
  # data from the uploaded file read into $data
  # load all $data into a LOB column
};
I know the uploaded file can be stored in a file and then the file, in turn, is bound to a LOB column.  But this is extra processing.

I also know that I can store the whole file in a variable but that could take up a lot of memory.


bong@tumanut.net

Thread Previous | Thread Next


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About