0

I have large amount of files(approx 80000) stored into sql server database as BLOB. Now I have a situation where I need to export all those file in blob to IBM Filenet.

For that what I think that first I need to stream those existing blob data into file system and then I will use filenet for uploading those file into filenet server.

Now please help me writing a C# utility which will convert those huge blob data into corresponding files.

ᄂ ᄀ
  • 5,669
  • 6
  • 43
  • 57
Tapas Mahata
  • 343
  • 6
  • 22
  • 1
    -1 What is your question and what have you tried? If you want us to write a problem, SOF is not your codegenerator... – Kooki Jun 21 '13 at 10:38

1 Answers1

0

You can be Managing FILESTREAM Data by Using Win32 API.

This link contains C# code that loads BLOB into a variable in you C# code. Then you can save it with path, file name and extention derrived from DB as well. Here is a a small quote of code:

//Read the data from the FILESTREAM
//BLOB.
sqlFileStream.Seek(0L, SeekOrigin.Begin);

numBytes = sqlFileStream.Read(buffer, 0, buffer.Length);

string readData = unicode.GetString(buffer);

if (numBytes != 0)
    Console.WriteLine(readData);

See also Using FILESTREAM Storage in Client Applications.

Stoleg
  • 8,972
  • 1
  • 21
  • 28