Insert 3 Gb binary file to oracle blob using Ado.net oracleclient

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I was trying to insert 3Gb binary file to oracle 10g BLOB Field using
ADO.Net
The application uses Oracle Transaction .
Now I have tried to read the file using following code (C#)
string filePath = aFilePath ;
FileStream fls = new
FileStream(aFilePath,fileMode.open,FileAccess.Read);
byte[ ] blob = new byte[fls.length] ; // here I am Getting the error
fls.Read(blob,0,System.Convert.ToInt32(fls.Length));


The error was Arithmetic operation overflow .
After that tried to declare the array using actual no .
byte[] blob = new byte [1700000000] It is not giving the error (1.7
GB value)
byte[] blob = new byte [2000000000] Gives error of overflow (2 Gb
Value)
These nos are within the int32 limit .

The main purpose of the application is to insert 3 gb binary file in
the oracle 10gb
Database using the Ado.net application .(.Net Frame work 1.1 , C# ,
visual studio
2003 )
How I can read the 3 GB binary file using .net and store all the bytes
in array .
I do not want to update the record so I would like to assign the Array
of byte
as parameter Value as mention below.

OracleParameter pBlob = new
OracleParameter("I_MMS_DOC_BLOB_DATA",OracleType.Blob);
pBlob.Direction = ParameterDirection.Input ;
pBlob.Value = blob; // parameter of Array

fls.length is long but I am also not able to use the max value
of the int32 . Is there any limit on arraysize in .net 1.1 or there
is any other way to store all the bytes in the array .

.



Relevant Pages

  • Re: binary i/o files
    ... strange characters on the screen. ... I am able to store the values in an ASCII format. ... write press....where pressis the array I am trying to ... write in the binary file. ...
    (comp.lang.fortran)
  • Re: binary i/o files
    ... I am able to store the values in an ASCII format. ... write press....where pressis the array I am trying to ... write in the binary file. ...
    (comp.lang.fortran)
  • Re: im facing problem with fread()??
    ... >> i am writing a simple prgm to read a .txt file then store the contents ... >> into the array... ... > If triangle.txt is a binary file then try rb instead of r in fopen. ...
    (comp.lang.c)
  • RE: pop-up browser persist data back to parent page code-behind
    ... As for the file content, if they're binary file, you can just read out the ... binary content out of the stream and store into a bytearray, then, we ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: Accessing files copied by UTL_FILE.FCOPY
    ... moving files into and out of ASM states it can copy from OS directory ... provides procedures to copy a binary file within a database or to ... it is an orphan usable in only a single version of the database. ... Oracle Ace Director & Instructor ...
    (comp.databases.oracle.misc)