Hi Peeps,

I have several import routines that imports data from xml files. I currently use this code to see if the row already exists:-

Code:
                iRowExists = False
                iCurrentRow = -1
                For iRowCount = 0 To sqlDSStoreContacts.Tables(0).Rows.Count - 1
                    If sqlDSXMLStoreContacts.Tables(0).Rows(iRows).Item("SC_ST_STORECODE") = sqlDSStoreContacts.Tables(0).Rows(iRowCount).Item("SC_ST_STORECODE") And _
                       sqlDSXMLStoreContacts.Tables(0).Rows(iRows).Item("SC_NAME") = sqlDSStoreContacts.Tables(0).Rows(iRowCount).Item("SC_NAME") Then
                        iRowExists = True
                        iCurrentRow = iRowCount
                        Exit For
                    End If
                Next
My problem is that as the table grows the update takes forever. Is there a simpler way of determining if the rows exists you the unique columns as its identifier.

Thanks for any assistance,

Jiggy!