Dear Ashish,
Storing images in Oracle through VB can be done through Chunks
I am sending you the following code. Please go through the procedure. I hope this will suffice your query.
Dim OraSession As OraSession
Dim OraDatabase As OraDatabase
Dim Part As OraDynaset
Dim PartImage As OraBlob
Dim ImageChunk() As Byte
Dim amount_written As Long
Dim iMaxtest1 As Integer
'Create the OraSession Object.
Set OraSession = CreateObject("OracleInProcServer.XOraSession")
'Create the OraDatabase Object by opening a connection to Oracle.
Set OraDatabase = OraSession.OpenDatabase(xxx, "xxx/xxxxx", 0&)
'OraDatabase.Connection = "Provider=OraOLEDB.Oracle.1;Password=xxxx;
Persist Security Info=True;User ID=xxx;Data Source=xxxx"
'Create a Dynaset containing a BLOB and a CLOB column
Set Part = OraDatabase.CreateDynaset("select * from Table_Name ", 0&)
Part.MoveLast
Set PartImage = Part.Fields("Pat_Photo_1").Value
'Part.AddNew
Part.Edit
'Part.Fields("Pat_PIN").Value = Val(txtRaces.Text)
'Part.Fields("Pat_Photo_1").Value = Empty
Part.Fields("Races_PIN").Value = Val(txtRaces.Text)
Part.Fields("Pat_Photo_1").Value = Empty
Part.Update
'move to the newly added row
Part.MoveLast
'Open the file for reading PartImages
If strFileName <> vbNullString Then
Open strFileName For Binary As #1
'Re adjust the buffer size to hold entire file data
ReDim ImageChunk(LOF(1))
'read the entire file and put it into buffer
Get #1, , ImageChunk
'call dynaset's Edit method to lock the row
OraSession.BeginTrans
Part.Edit
amount_written = PartImage.Write(ImageChunk)
Part.Update
'Close File #1
Close #1
'OraSession.Rollback
End If
Bye
Srikanth