I am using a TempDB table as a form data source and am facing an issue where the data is not showing up in the form. Issue: I found out by debugging, linkPhysicalTableInstance in the clicked method, it did not work well.
TestEnumInfoTempDs.linkPhysicalTableInstance(tempTable);
The records are getting inserted into the tempTable, but there are no records in the TestEnumInfoTempDs table and get error that
An object reference is required for the non-static field, method, or property 'TestSearchTableEnumFormCopy.TestEnumInfoTempDs'.
I referred to this documentation: http://alexvoy.blogspot.com/2018/03/tempdb-table-on-form-with-multiple.html and implemented it in the following steps:
- I created a Temp table with three fields. Table Type is TempDB.
- Created a form and set the above Temp Table at the form datasource.
- Added populate method(the parameter is the EDT entered in the FormStringControl) to insert data into Temp Table.
- Then override form’s init() method and initialize another tempDB buffer of the same type and link its physical instance to the current data source buffer.
- We added the rePopulate() method to the Form and called the Populate method of the Temp Table created in #3.
- Finally, added the clicked() method of the OK command button.
Any advice would be greatly appreciated.