Jump to content
MichaelLotosh

rs.Properties("Unique Table")

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use