Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple-step ole db operation generated errors

Status
Not open for further replies.

jeffmoore64

Programmer
Mar 23, 2005
207
US
The error occurs at the position shown in the code sample. I have googled the error message and am not really sure of what to make of the answers out there. One of which involves modifiying the registry. Is this some thing to do with nulls???
tia
Jeff
Code:
                If Me!txt_revised = False Then
                    Me!txt_revised = True
                    ssql = "SELECT id, fld_rev_changes FROM dbo.tbl_ITP WHERE (id = " & Me!txt_ITP_id & ")"
                    Set rs1 = New ADODB.Recordset
                    rs1.Open ssql, connection, adOpenDynamic, adLockOptimistic
                    If IsNull(rs1!fld_rev_changes) Then
                        rs1!fld_rev_changes = Me!txt_activity_id
                        rs1.Update
                    Else
                        tmp_rev = rs1!fld_rev_changes & "," & Me!txt_activity_id
-------->                rs1!fld_rev_changes = tmp_rev
                        'rs1.Update
                    End If
                    rs1.Close
                End If
 
Hi,

This probably has nothing to do with the registry. The code looks O.K. but check if txt_activity_id has a string value in it and that the length of the string that you are trying to input is not longer than the max length for the field you are trying to update. What sort of error message did you get anyway?

 
The message is: Multiple-step OLE DB operation generated errors.
I think you are correct .. the problem lies in that my data input to my field is too long.
I posted on this problem.
Thanks
 
Replace this:
tmp_rev = rs1!fld_rev_changes & "," & Me!txt_activity_id
By this:
tmp_rev = Trim(rs1!fld_rev_changes) & "," & Me!txt_activity_id

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks ... I changed my fields from char to varchar and then deleted the white space. That fixed the problem..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top