FoxPro views

Questions and answers regarding general SQL and backend databases

FoxPro views

Postby caroline.j » Sun Feb 12, 2012 1:06 pm

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
caroline.j
 
Posts: 81
Joined: Wed Feb 08, 2012 9:25 pm

Re: FoxPro views

Postby AlanBourke » Mon Feb 13, 2012 12:30 pm

I'm fairly sure it doesn't work with Visual FoxPro Views, as this thread would seem to confirm: http://www.hxtt.com/support_view_issue.jsp?product=dbf&id=1226661738

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.
-------------------------------------------------------------------------------------------
Servoy SAN Developer
User avatar
AlanBourke
 
Posts: 198
Joined: Tue Aug 02, 2011 3:32 pm
Location: Dublin, Ireland

Re: FoxPro views

Postby caroline.j » Tue Feb 14, 2012 9:45 am

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?
caroline.j
 
Posts: 81
Joined: Wed Feb 08, 2012 9:25 pm

Re: FoxPro views

Postby crichton » Tue Feb 14, 2012 10:05 am

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.
crichton
 
Posts: 1
Joined: Tue Feb 14, 2012 9:52 am

Re: FoxPro views

Postby caroline.j » Tue Feb 14, 2012 8:49 pm

thanks Crichton I think that makes sense - I guess I will really have to play with it a bit more!!
caroline.j
 
Posts: 81
Joined: Wed Feb 08, 2012 9:25 pm


Return to SQL Databases

Who is online

Users browsing this forum: Google [Bot] and 25 guests

cron