The Rookie Rides Again - Database schema updating

Questions and answers regarding the use of eclipse environment as seen in Servoy Developer

The Rookie Rides Again - Database schema updating

Postby RonG » Thu Dec 16, 2010 6:23 pm

Hi all,

While researching a problem I'm having sporadically when creating new forms, I've run up against what's probably a simple question, but for which I've been unable to find an answer. And the question is this....

If I'm in pgadmin and make a change to a field in a table or otherwise change the schema, when I get back to Eclipse and the Servoy Developer, I'm confronted with 2 options....
"Synchronize with DB Server Information"
"Reload Tables/Table Structure From DB"

I'm unclear about what the difference is between the 2. I've looked in the eclipse user guide, the Servoy 4 doc, and Servoy 5.2 doc, and haven't had any luck finding an explanation. So, a 2 part question....
1. For future reference, is there a source for this kind of information in the doc?
2. What's the difference between those 2? I end up doing both, and I'm not sure why or what effect that has.

As always, thanks for any nuggets of knowledge you might throw my way, and have a good day.

Ron
Ron Gafron
Aspen Ridge Arts/WorkingArtist software
RonG
 
Posts: 198
Joined: Tue Feb 16, 2010 11:20 pm
Location: Chicago, Illinois, USA

Re: The Rookie Rides Again - Database schema updating

Postby mboegem » Fri Dec 17, 2010 10:19 am

Hi Ron,

if I'm not mistaken:
1 - reload table structure will force Servoy to update the schema that's on the database (as Servoy is not automatically aware of any changes within a session)
2 - synchronize will open the synchronize window to sync your dbi files (workspace) with the current schema Servoy is aware of.

as for 1: when doing this, you will most probably see errors and/or warnings in the eclipse view.
right click on a column change, choose quick fix and Servoy will open the synchronize window for you.

Sometimes I end up just restarting Serclipse as it is totally lost after making changes at the DB-admin.
At (re)start Servoy will automatically update the schema as meant in step 1.

Hope this helps.
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image

Partner of Tower - The most powerful Git client for Mac and Windows
User avatar
mboegem
 
Posts: 1742
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: The Rookie Rides Again - Database schema updating

Postby RonG » Fri Dec 17, 2010 9:34 pm

Hi Marc,

Thanks for that information. Matches up very well with what I found out myself since yesterday. Always nice to have another set of eyes looking at things.

The advice I was given was that when you make changes to the database in something like pgadmin, when you return to Servoy developer, you use the "reload data structure" option. Occasionally this won't catch everything, and when this happens the issue is usually resolved by restarting the Developer, as you said. When you make changes this way, tho, the DBI information isn't updated automatically, so you need to do the "sync" option as well.

As I understand it, when you start Servoy, Servoy will read the database structure directly from the DB itself, and stores that information locally "someplace". Presumably, at this point, the DB structure information will match the DBI data. If you make changes to the DB structure, this needs to be relayed to the DBI as well, otherwise the local DB information will be out of sync with the DBI file.

That's what I've learned so far, anyway. Thanks again for your help.

Ron
Ron Gafron
Aspen Ridge Arts/WorkingArtist software
RonG
 
Posts: 198
Joined: Tue Feb 16, 2010 11:20 pm
Location: Chicago, Illinois, USA


Return to Eclipse Environment

Who is online

Users browsing this forum: No registered users and 4 guests