Referential Integrity

The place for peer-to-peer support for developing client-server applications with VPME 9.1.

Referential Integrity

Postby fporratar » Mon Mar 04, 2013 9:54 am

Hi All,

I have the following issue or question: Im trying to use some tables as Remote Tables conected to SQL 2008, and I confused in the following scenario:

I have a Client.dbf table a LV_Client Local View and a RV_Client Remote view also I have the Payments.DBF table, LV_Payments local view and RV_Payments remote view.

THe key that reference those tables is clientcd for example, Where I have to setup the referential integrity in the Payments.dbf table, the LV_Payments Local View or the RV_Payments remote view. and If I put in the Payment form the LV_Payments local view is that enough?

Regards
fporratar
 
Posts: 10
Joined: Sun Mar 03, 2013 10:07 pm

Re: Referential Integrity

Postby stecenko » Mon Mar 04, 2013 10:02 am

Are you using 9.0 or 9.1?
Richard Stecenko
Interactive Computer Services Inc.
Victoria, British Columbia
204.453.2052
stecenko
 
Posts: 822
Joined: Mon Jun 21, 2010 8:06 pm
Location: Saanich, British Columbia

Re: Referential Integrity

Postby fporratar » Mon Mar 04, 2013 1:20 pm

Hi I'm using 9.1

Regards
fporratar
 
Posts: 10
Joined: Sun Mar 03, 2013 10:07 pm

Re: Referential Integrity

Postby stecenko » Mon Mar 04, 2013 11:11 pm

Then you don't need the dbf

You can do (maybe should do) the entire project using remote views.

"The key that reference those tables is clientCd
For example, Where I have to setup the referential integrity in the Payments.dbf table,
the LV_Payments Local View or the RV_Payments remote view.
and If I put in the Payment form the LV_Payments local view is that enough?"

So if the data is on the SQL server and you are accessing the data using the remote view RV_Payments and the client data is also on the SQL Server, then in RV_Payments.fkClientCd you set up the Ref Int to the remote view for Client.

I think you should start to simplify your application and put everything in SQL; that way you are not faced with this dilemma. I do not understand how you can have an application with DBFs, local views, and remote views. Are you deliberately trying to drive yourself crazy.
Richard Stecenko
Interactive Computer Services Inc.
Victoria, British Columbia
204.453.2052
stecenko
 
Posts: 822
Joined: Mon Jun 21, 2010 8:06 pm
Location: Saanich, British Columbia

Re: Referential Integrity

Postby fporratar » Tue Mar 05, 2013 2:21 pm

Hi Stecenco,

No I'm not, is simply we are converting an existing application and Only want to move the more heavier data tables to SQL, and all the forms are created using the existing dbf table....
fporratar
 
Posts: 10
Joined: Sun Mar 03, 2013 10:07 pm

Re: Referential Integrity

Postby stecenko » Tue Mar 05, 2013 5:57 pm

Ok, that explains it: so you are going to have a mixture of VFP tables and Sql Tables.

Client is a SQL table for which you have a remote view.

Payments is VFP table for which have a local view.

So whether you put rv_client in the Ref Integrity tab of fkClientCd in the table or the local view depends on which one is going to be the ISA of the payments form.

If payments is the ISA of the form, then in payments.fkClientcd you would put rv_client.
But, if you're using lv_payments as the ISA of the form, then in lv_payments.fkClientcd you would put rv_client.
Richard Stecenko
Interactive Computer Services Inc.
Victoria, British Columbia
204.453.2052
stecenko
 
Posts: 822
Joined: Mon Jun 21, 2010 8:06 pm
Location: Saanich, British Columbia

Re: Referential Integrity

Postby fporratar » Mon Apr 15, 2013 4:31 pm

Hi,
Thanks for the answer, but I have another question: What is the difference between the PARTENT RI CURSOR and the VALIDATION CURSOR in the Referential Integrity screen, do we need to use both?
Regards
fporratar
 
Posts: 10
Joined: Sun Mar 03, 2013 10:07 pm

Re: Referential Integrity

Postby stecenko » Thu Apr 18, 2013 4:31 am

In the vpme help, search for...
Referential Validation Setup - Details

That explains what each is used for and when you need both or can get by with one.
Richard Stecenko
Interactive Computer Services Inc.
Victoria, British Columbia
204.453.2052
stecenko
 
Posts: 822
Joined: Mon Jun 21, 2010 8:06 pm
Location: Saanich, British Columbia


Return to VPM Enterprise 9.1 - Client Server

Who is online

Users browsing this forum: No registered users and 2 guests

cron