Major problem with Existing projects, Data Refresh and the New Query Builder

I upgraded from 8.5.8.0 to 8.5.11.0 in order to take advantage of the new much heralded query building capability, which, on paper looks like a very good thing. In reality it is a nightmare. If I perform a Refresh of the data in an existing upgraded project it wipes all of my views (they end up with no fields in them at all) and essentially trashes the application. (The application uses the desktop interface and has close to 100 tables and grids). I now must assiduously avoid doing a table Refresh and have to hand-stitch all commands, fields, queries and links to the database - which rather defeats the object of the costly upgrade. So my question is how do I perform an upgrade of an existing application such that I can safely use the new query builder?
2 people have
this problem
+1
Reply
  • Hi Paul,
    We have experienced similar issues with some of our applications. We think that we have narrowed the problem down to a corrupted database model/schema in SQL server. I've had my SQL admin review and fix one of the databases to test the theory and it seems to be working so far.

    See here for our list of issues: http://community.codeontime.com/codeo...
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. indifferent, undecided, unconcerned happy, confident, thankful, excited kidding, amused, unsure, silly sad, anxious, confused, frustrated

  • Paul,

    The data models used by the app generator simply expose the hidden functionality in previous releases that compose the "baseline" controllers. Any transactions made in the Project Designer are then applied (matched by name) to the components you customize. If the names of your models, controllers, and fields differ from those stored in the transactions, those transactions will be ignored. This technique allows modifying the database schema while preserving valid changes. Unfortunately the app generator is not able to determine between a renamed table and a table that has been dropped and a new one created. 

    It can be difficult to determine what the problem may be for your particular project. I would start any investigation by comparing the names of your baseline controllers/fields in your old project with those defined in the models of the new project. If they match up exactly, it should produce the same output (assuming you have not added the dataModels="required" line in your project XML file).
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. indifferent, undecided, unconcerned happy, confident, thankful, excited kidding, amused, unsure, silly sad, anxious, confused, frustrated

  • I’m happy
    Hi Paul,
    Not sure if this will be any help, but this is my approach that has worked well for many years:

    Once i have my base application, for any further changes I will always update the controller query and add new fields manually.

    To add new fields to a controller:
    1. Edit the base query (ie command1) in SQL studio and then paste it back in.
    2. Add a new Field to match the new DB field
    3. Add new datafield in the view.

    The only time I use refresh is when I add new tables, but with a twist:
    1. Ensure controller changes/log changes are commited into source control
    1. Use refresh/add tables
    2,Get the controller definition
    3.Revert my project changes (to before adding the new table)
    4.Edit the Controllers.Baseline.xml, Controllers.Log.xml and insert the controller definition.

    This way I have added new controllers without risking existing project.

    Ask me questions if you need.

    Pat
    • Pat,

      Note that when the Model Builder was introduced, we also added the ability to define individual baseline controllers. Create a copy of your controller XML file under the ~/WebSite/Controllers folder. Name it "[Controller].baseline.xml". The application generator will replace the generated baseline with the baseline defined in that file.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. indifferent, undecided, unconcerned happy, confident, thankful, excited kidding, amused, unsure, silly sad, anxious, confused, frustrated