Form Data Not Refreshing

Hi,

I didn’t get anywhere posting this in the Forms forum so have decided to re-post here…

Essentially, it seems that if you insert records into a table that you are viewing in a form application the new rows do not ever show up until you exit the browser and relaunch the app. Ctrl F5 does not work nor does sc_redir().

The issue can be recreated by following the steps below…

  1. Create a table called test with two columns. My columns were unique_id (int, pk, ai) and col1 (varchar(45)).

  2. Create a form which uses this table. I called mine form_test.

  3. Create a blank application (I called mine blank_insert) which uses the following code in the onExecute event…

// Insert record
$sql = “INSERT INTO test (unique_id, col1) VALUES (null, ‘test record’)”;

sc_exec_sql($sql);

sc_commit_trans();

sc_redir(‘form_test’);

  1. Run blank_insert to insert the first record.

  2. Create a link button on form_test which links to blank_insert.

  3. Run blank_form.

  4. No matter how many times you click the link button you will only ever see one record. The only way to get the data to show is to close the app and relaunch.

Regards,

Mike