MichaelLotosh Posted September 19, 2017 Report Share Posted September 19, 2017 Hello, VBUC didn't convert the code: rs.Properties("Unique Table") = "table_name" Do you have any recommendations how to handle it? Thanks, Michael Link to comment Share on other sites More sharing options...
Mobilize.Net Staff OlmanQuesada Posted September 19, 2017 Mobilize.Net Staff Report Share Posted September 19, 2017 Hi Michael, Could be that possible to give us more context about the code. Perhaps a small VB6 sample code. Regards Olman Q Link to comment Share on other sites More sharing options...
MichaelLotosh Posted September 19, 2017 Author Report Share Posted September 19, 2017 Hi Olman, 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 Link to comment Share on other sites More sharing options...
Mobilize.Net Staff OlmanQuesada Posted September 20, 2017 Mobilize.Net Staff Report Share Posted September 20, 2017 Hi Michael, 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() Cheers, OlmanQ Link to comment Share on other sites More sharing options...
KevinKor Posted June 26, 2018 Report Share Posted June 26, 2018 How would one modify the code to get similar results for an Update method? Currently, the method goes as follows: "AdoRecordSetHelper.getProperties().Item("Unique Table").setValue("table");" Thanks Link to comment Share on other sites More sharing options...
Mobilize.Net Staff OlmanQuesada Posted August 7, 2018 Mobilize.Net Staff Report Share Posted August 7, 2018 You should recreate a new update from scratch that reflects the changes in that table. Please take a look at this URLhttps://stackoverflow.com/questions/34623292/how-to-update-a-table-using-join-in-visual-studio Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now