[AccessD] Updating a bound image using VBA

David & Joanne Gould dajomigo at tpg.com.au
Wed Sep 6 17:09:57 CDT 2006


I have a form for entering new movie stock into a Video Library database. 
This form also allows the user to update details for all copies of the 
title. Because of this the data is updated using code. One of the fields in 
the table is an image field. The code I am using is:

  'Update Movie Title Details
     Dim rsUpdateMovieTitleDetails As Recordset
     Dim strMovieName As String

     strMovieName = Forms![frmAddNewMovieStock]![cboSelectMovieTitle]

     Set rsUpdateMovieTitleDetails = New ADODB.Recordset
     rsUpdateMovieTitleDetails.ActiveConnection = CurrentProject.Connection
     rsUpdateMovieTitleDetails.Open "tblTitles", , adOpenKeyset, 
adLockOptimistic, adCmdTable

     'Loop through the recordset
     Do Until rsUpdateMovieTitleDetails.EOF
         If rsUpdateMovieTitleDetails.Fields("name") = strMovieName Then
             rsUpdateMovieTitleDetails.Fields("supplier") = Me.supplier
             rsUpdateMovieTitleDetails.Fields("rating") = Me.rating
             rsUpdateMovieTitleDetails.Fields("categoryName") = Me.categoryName
             rsUpdateMovieTitleDetails.Fields("RentalTypeID") = Me.RentalTypeID
             rsUpdateMovieTitleDetails.Fields("cover") = Me.oleCover
         End If
         rsUpdateMovieTitleDetails.MoveNext
     Loop
     rsUpdateMovieTitleDetails.Close

I keep getting this error message:

Multiple-step OLE DB operation generated errors. Check each OLE DB status 
value, if available. No work was done.

Can anyone explain to me what I can do about this?

TIA

David Gould
DG Solutions 





More information about the AccessD mailing list