I have to replace static temp-table with a dynamic temp-table in my application because the table will now exist in the database. My question is- Do I now need to replace all the static queries with dynamic queries. I mostly work with static queries.
Hello Stefan, could you please tell me what you mean by "why not just rename the temp-table and put it in its own namespace?" At the moment, I have a define temp-table in my program and all queries use the temp-table. Now the temp-table is in the database like any other table.
I mean that temp-table is being removed. Instead, a table to database is added having the same fields as temp-table. my screen (used for display) and its queries, still use the temp-table as defined earlier. Now, I intend to remove the temp-table and have it as a database table.
define temp-table ttQuote no-undo
field quote-date as date
field risk as character
field client-name as character
field address as character
field product-code as character
field risk-num as integer
field risk-version as integer
field risk-det-num as integer
field state as character.
This temp-table has the fields that I want to display on my dashboard. If I need extra fields in my report, the user will have to add fields on this temp-table.
Every time an extra field is needed, the temp-table gets edited. If this was to be replaced with a database table then the users can add or remove fields from the maintenance screen. Also, the dynamic temp-table will pick the additional fields.
Hello @TomBascom, the reason is that when the user says I would like the see 'new field' on the dashboard, we do not need a programmer to add this to the temp table, we can just create a new record and the dashboard routine will pull the data in. Therefore, we do not need to wait for a release in order to supply the information to the user. I am not sure, how I can implement this. At the moment, this is existing in the form of static queries and a temp-table that has got the fields of the dashboard