Data Not Refreshing

Hi Guys,

SC Version:[SIZE=12px]8.1.065[/SIZE]

I have a master / detail form. I would like to give users the option to duplicate a record in this master / detail form; I have therefore created a button which links to a control app. The control app then inserts a new record into the master table and inserts new record(s) into the detail table. This all works fine…

The problem that I have is that when the control app redirects back to the master / detail form I’m not seeing my new data (The data is there as I can see it in the MySQL Workbench). The only way that I can get the new rows to show up is by exiting the master / detail form and loading it again!

I have tried using sc_redir(), sc_exit(ref) and sc_exit(sel) and am calling sc_commit_trans() right before the redirect. Does anybody have any ideas? I’m using InnoDB BTW.

Mike

On further testing I think that I may know what’s happening…

It looks like after the insert and subsequent sc_redir() back to the form that the data IS being refreshed (I can find my new record using the quick search tool). It seems though that the navigation buttons are not being refreshed to reflect the new data, so when I select the last button (my appended records are always at the end of the table) I get the second to last record.

This looks like a bug. Could someone confirm?

Regards,

Mike

Hi,

Here’s how to recreate the issue. Looks like a bug…

  1. Create a table called test with two columns. Mine 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.

This is causing us major problems with our app as we need to be able to insert records programmatically.

Regards,

Mike

Mike

Suggest tell SC about this bug.

Anyone: How does one inform SC of bugs?

As Jack says…

Does anyone know the best way to inform NetMake about this issue? It’s causing us big problems. Do they monitor this forum?..

Regards,

Mike