Jump to content
KevinKor

rs.getProperties().Item("Unique Table")

Recommended Posts

Hello,

VBUC didn't convert the code: rs.getProperties().Item("Unique Table").setValue("tableColumnName");

Do you have any recommendations on how to handle it?

 

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 the code,  we need to update the record from table1.

 Without rs.Properties("Unique Table") = "table1" the recordset will update the records from both tables and not just table1.

It then calls the method, getProperties, which is in the NotUpgradedHelper class.

Share this post


Link to post
Share on other sites

Hello,

ADO.Net  does not provide that functionality as classic ADO or ADODB does, that’s why the VBUC generate a stub indicating that property is not supported. In order to achieve the same functionality will require changes in your migrated code.

 

The VBUC converts classic ADO components (like the recordset) to ADO.Net components. In specific, the recordset is migrated to a helper class that inherits from the System.Data.Dataset object.

This class includes methods/properties to emulate the behavior of the classic Recordset when possible, but there are some of them that cannot be emulated as ADO.Net does not provide any way to recreate them.

For instance, using the <Recordset>.Properties(“Unique Table”) to indicate which table to be updated when the recordset is populated via a SQL JOIN statement.

To get the functionality described above, you can use the <RecordsetHelper>, the Update/Insert/Select clauses must be provided in order to perform those operations. You can use the SQlInsertQuery, SQLUpdateQuery and SQLDeleteQuery properties of the RecordsetHelper class to indicate the Sql statement to use to execute SQL operations.

As a workaround to this, Update/Insert/Delete SQL must be specified to perform those operations (here some info from Microsoft : https://docs.microsoft.com/en-us/aspnet/web-forms/overview/data-access/advanced-data-access-scenarios/updating-the-tableadapter-to-use-joins-cs)

 

 

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

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