Page 1 of 1

Zeos / MySQL Posting Problem

Posted: 22.04.2008, 14:42
by edrobinson
Using 6.6x

I have a set of table controls connected to our MySQL server. The table controls are linked to DBGrid controls and the contents display OK.

If I makea change it is not saved to the database when the app closes although it shows while running.

Any thoughts?

Thanks,
Ed

Posted: 24.04.2008, 07:44
by zippo
More options to test:

- Is CachedUpdates set to true? Then set it to false.
- Is ReadOnly set to true? Set it to false.
- Are you updating a MySQL view instead a table? Try to open another table.
- Try to add a Button on the form and write this OnClick event:

Code: Select all

  Dataset.Edit;
  Dataset.FieldByName('FIELDNAME').AsString := 'test';
  Dataset.Post;
  Dataset.Refresh;
Of course you should change the FIELDNAME with a real field and change the component's name Dataset into a real (ZeosLib) dataset.

Posta any errors (if any) here.

Posted: 24.04.2008, 14:32
by edrobinson
Thanks zippo.

I found the problem.

I had loaded the tables using an exported sql script from another database that did not include any key values.

As soon as I set the primary keys everything works as expected.

Thanks again,

Ed

Posted: 24.04.2008, 19:33
by zippo
You're welcome! I'm glad another problem is solved (even if you solved it by yourself, he he he)