Here is my example using SqlClient... shouldn't be too different from what
you need. This example write the blob out to a file.
Public Sub Load()
Dim dr As Data.SqlClient. SqlDataReader
Dim ParamList(0) As SqlParameter
Dim index As Int32
Dim fs As FileStream
Dim bw As BinaryWriter
Dim intBufferSize As Integer = 100
Dim aryBLOB(intBuff erSize - 1) As Byte
Dim lngBLOB As Long
Dim lngStartIndex As Long = 0
Dim strBinaryFile As String
If Right(m_strDocu mentLocation, 1) = "\" Then
strBinaryFile = m_strDocumentLo cation & m_strDocumentNa me
Else
strBinaryFile = m_strDocumentLo cation & "\" & m_strDocumentNa me
End If
Try
ParamList(0) = SQLHelper.MakeI nParam("@Docume ntTypeID",
SqlDbType.Int, 4, 434)
dr = SQLHelper.GetDa taReader(Comman dType.StoredPro cedure,
"DocumentLo ad", ParamList)
If dr.Read Then
fs = New FileStream(strB inaryFile, FileMode.OpenOr Create,
FileAccess.Writ e)
bw = New BinaryWriter(fs )
lngStartIndex = 0
lngBLOB = dr.GetBytes(dr. GetOrdinal("doc ument"),
lngStartIndex, aryBLOB, 0, intBufferSize)
Do While lngBLOB = intBufferSize
bw.Write(aryBLO B)
bw.Flush()
lngStartIndex += intBufferSize
lngBLOB = dr.GetBytes(dr. GetOrdinal("doc ument"),
lngStartIndex, aryBLOB, 0, intBufferSize)
Loop
bw.Write(aryBLO B)
bw.Flush()
bw.Close()
fs.Close()
bw = Nothing
fs = Nothing
End If
Finally
If Not dr Is Nothing Then
dr.Close()
dr = Nothing
End If
SQLHelper.Dispo se()
End Try
End Sub
"Ramesh" <Ra****@discuss ions.microsoft. com> wrote in message
news:F7******** *************** ***********@mic rosoft.com...
How to read a BLOB from oracle 8i using OleDb