Jump to content

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


KevinKor

Recommended Posts

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.

Link to comment
Share on other sites

  • Mobilize.Net Staff

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)

 

 

 

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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