I need to populate the Tempdb table with data on opening the form. For this I am inserting data in the Init method of the form data source with below steps
Created a variable for the Tempdb table and inserted records in it.
Now FormdatasourceName.linkPhysicalTableInstance(tembdbvariable) which is loading the data fine.
I have a button on the form and on clicking it I need to again populate the Tempdb data source and display data for which I followed the same steps above and it gives me the below error
Cannot execute the required database operation. The method is only applicable to TempDB table variables that are not linked to existing physical table instance
I followed some blogs but couldn't understand the steps.
Populate the Tempdb datasource for form on button click event
You don't need to use linkPhysicalTableInstance() at all. Instead of inserting records to tembdbvariable and then linking the temporary data with FormdatasourceName, you can simply insert records to FormdatasourceName. Then you delete records from FormdatasourceName and insert new ones.
Was this reply helpful?YesNo
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.