Field Name change not reflected in IDE lazarus / 16-Databases ---------------------------------------------------------------------- HatForCat · 2016-02-18 15:53 Using SQLite, Zeos 7.2 and several TDBEdits. I used SQLite Expert to manage the database and when I change a Field Name in the data base I can't seem to get it reflected in the IDE for assigning as the FieldName for a TDBEdit. I am not using Persistent FieldNames by the way. I have tried connecting and disconnecting the Connection, Activating and deactivating the Table, I even deleted the connection between the table and the DataSource. Still had the old FieldName list. Finally did a rebuild of the IDE and viola! New FieldName list. Is there an easier way to do this? In Delphi, I just have to set the table Active:=False then Active:=True and it updates the FieldName list. ---------------------------------------------------------------------- zeljko · 2016-02-18 17:04 Probably bug in zeos. Try to disable metadata in zeos and see if that helps ---------------------------------------------------------------------- HatForCat · 2016-02-18 17:25 Quote from: zeljko on February 18, 2016, 06:04:26 pmProbably bug in zeos. Try to disable metadata in zeos and see if that helps Nope, also tried with with tDBF table, same thing. Seems to be something to do with the way DataAware components are being handled at Design time. Throws an error at runtime as one would expect when the FieldName in the DBEdit no longer exists in the database. ---------------------------------------------------------------------- HatForCat · 2016-02-18 17:41 Actually, just tried defining Persistent Fields. So, even after the rebuild of the IDE and it now showing the correct FieldNames from the database, it created Persistent definitions using the old FieldNames. A Lazerus bug to be sure. I am trying to stay away from my old Delphi-5 under XP, but this ain't helping. ---------------------------------------------------------------------- Thaddy · 2016-02-18 17:42 My best guess is that the screen needs updating on some platforms. It looks like nothing more than a display issue. ---------------------------------------------------------------------- HatForCat · 2016-02-18 18:43 Quote from: Thaddy on February 18, 2016, 06:42:23 pmIt looks like nothing more than a display issue. Might want to check my posts again. I took a rebuild of the IDE to get it to work right. That's a little more than a screen issue? No? Also creating the Persistent Fields after the IDE rebuild. ---------------------------------------------------------------------- rvk · 2016-02-18 21:31 I just tried it with TSQLite3Connection and TSQLQuery and it worked ok. Just had to disconnect the TSQLite3Connection otherwise the SQLManager couldn't change my opened table but after that I could rename a column and connect again and set the TSQLQuery to true after which the fieldnames (TFieldDefs in object inspector) were updated. So it must be a combination of components for you. It's not "just" Lazarus. Lazarus 1.4.4 If you could create a small test-project or describe the exact steps maybe you could enter this as a bug in the bugtracker (or we could see if we could recreate it). But more information is needed (exact Lazarus version and exact steps to recreate from blank project). ---------------------------------------------------------------------- HatForCat · 2016-02-19 13:12 Quote from: rvk on February 18, 2016, 10:31:06 pm maybe you could enter this as a bug Thanks for going to the trouble to test, but I have a quick work around. In the designer I selected another table from the list. That forced it to check the table structure. Then I selected the original table from the list and again, it was forced to check the structure, and that brought in the Field changes. Not perfect, but only takes a few seconds. I wouldn't call it a bug, more like an oversight. It should be watching file date/time stamps. It does that for editor files. But, as you suggest might not be just a Lazarus thing.