Why might my ADODB.Recordset suddenly quit adding new records?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • firebirdxvi
    New Member
    • Jun 2014
    • 4

    Why might my ADODB.Recordset suddenly quit adding new records?

    My ADODB.Recordset is being populated as desired for 5 records, then all subsequent records don't get added anywhere. I checked in debug and the code runs through this loop the desired 8 times, but only adds a record the first 5.

    Any ideas why this is happening to me?
    Code:
    With doc.Tables(8)
    For I = 2 to .Rows.Count
    S.AddNew
    
    S![PN] = .Cell(I,3).Range.Text
    'and more lines like this ^
    
    S.Update
    Next
    End With
    Thanks for any input!
  • firebirdxvi
    New Member
    • Jun 2014
    • 4

    #2
    SOLVED.

    I had accidentally set a field as Indexed (No Duplicates) which kept the last few records from adding.

    Thanks for reading my question.

    Comment

    Working...