Hi you can ado streams which is available in ado 2.5 or above. I m giving you a source code of vb using sql server but this will be very much helpful for you. In case if u still have problems then pls contact.
Niraj
Code for storing Image
Dim rs As New ADODB.Recordset
Dim mstream As New ADODB.Stream
rs.Open select * from StyleImage where styleNo ' & TxtStyleNo.Text & ' db adOpenDynamic adLockOptimistic
If rs.EOF False Then
MsgBox Stle Already Exist in Database
Exit Sub
End If
db.Execute exec insertintostyleimage & MCId & & SCId & & GId & & CompanyId & ' & TxtStyleNo & ' ' & TxtStyleDesc & ' ' & TxtStyleCost & ' ' & Img1.Picture & ' ' & Usercd & ' ' & Img2.Picture & ' ' & cmbexportername.Text & ' ' & txtexporterstyleno.Text & '
rs.Open select * from StyleImage where styleNo ' & TxtStyleNo.Text & ' db adOpenDynamic adLockOptimistic
With rs
If .RecordCount <> 0 And Img1.Picture <> LoadPicture( ) And Img2.Picture <> LoadPicture( ) Then
mstream.Type adTypeBinary
mstream.Open
fpath CD1.FileName
mstream.LoadFromFile fpath
.Fields( imagefilebig ).Value mstream.Read
fpath CD2.FileName
mstream.LoadFromFile fpath
.Fields( imagefilesmall ).Value mstream.Read
.Update
mstream.Close
End If
.Close
End With
code for retriving images
Dim rscat As New ADODB.Recordset
Dim mstream As New ADODB.Stream
rscat.Open select styleimage.* (select companyname from exporter where companyid styleimage.exporterid)as expname from styleimage where companyid & CompanyId & and maincatid & MCId & and subcatid & SCId & and catgroupid & GId & and styleno ' & CmbStyleNo & ' db adOpenDynamic adLockOptimistic
If rscat.RecordCount > 0 Then
mstream.Type adTypeBinary
Set Img2.Picture LoadPicture( )
If mstream.State 1 Then mstream.Close
mstream.Open
If IsNull(rscat.Fields( Imagefilesmall )) Then
Else
mstream.Write rscat.Fields( Imagefilesmall ).Value
If mstream.Size > 1 Then
mstream.SaveToFile App.Path & temp.jpeg adSaveCreateOverWrite
CD1.FileName App.Path & temp.jpeg
Img2.Picture LoadPicture(CD1.FileName)
mstream.Close
End If
End If