Share this post

Link to post

Share on other sites

We populate the recordset with a join of table1 and table2. In some other place in code we need to delete the record from table1. In order to do it we use rs.delete. Without rs.Properties("Unique Table") = "table1" the recordset will delete the records from both tables and not just table1.

Please let me know if it's still not clear.

Thanks,

Michael

Share this post

Link to post

Share on other sites

ADO.Net does not provide a direct way to achieve that, so the migrated code should be modified to get a similar result.
As the ADORecordsetHelper inherits from a Dataset, the properties of that class could be used:

Given rs is a ADORecordsetHelper you can try the following:
DataRow rowDel=ds.Tables["table1"].Rows[<IndexOfTheRowToDelete>];
rs.Tables["table1"].Rows.Remove(rowDel);
rs.Delete()