Hi I’m new to Servoy and am converting a FoxPro app.
I have a database with a number of tables and a couple of views however the views are not appearing within Servoy, is this normal or do I have an error somewhere?
Many thanks
Caroline
I’m fairly sure it doesn’t work with Visual FoxPro Views, as this thread would seem to confirm: HXTT JDBC Products: MS Access JDBC, Cobol JDBC, DBF JDBC, MS Excel JDBC,CSV JDBC, Text JDBC, Corel Paradox JDBC, PDF JDBC, Word JDBC, XML JDBC
I think the reason is that views are defined by Visual Foxpro code held within the DBC, and the HXTT driver cannot execute that code. It’s the same reason that triggers and stored procedures aren’t supported by the HXTT driver.
Thanks for that conformation - at least I wasn’t doing something silly.
It is however pretty annoying does anyone have any best practice suggestions of what I should be doing instead?
Hi Caroline
I have moved from VFP9 to Servoy a year ago, and it took me a while to really appreciate how cleaverly data binds in Servoy.
I have converted my Foxpro databases to Postgresql. Are you trying to use views in foxpro database? If so I would recommend switching to postgresql.
You no longer have any need for views, as Servoy handles all those joins automatically via relations. Imagine using a single Database Environment in VFP where the relations were all set up in the database gui… we’ll thats how Servoy works.
So basically you set up a table, then create the relations to any other tables to cover the same tables as per your views. Then on your form you you set the datasource as the top level table of the view table. All the relations to that table will then be available for you to place fields on the form. This is done by selecting the correct relation and drilling down to relations under that till you get the field thats in the correct relation to place on your forms and tabs. It’s hard to explain in text, but once you get the hang of it it’s brilliant. You can even programatically update any relation thats not part of this form or another one as Servoy seems to always have all the relations dynamically updating and binding.
Hope this helps a bit.
thanks Crichton I think that makes sense - I guess I will really have to play with it a bit more!!