Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Perl DBI::ODBC to VFP7 backend and Referential Integrety
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Perl DBI::ODBC to VFP7 backend and Referential Integrety
Divers
Thread ID:
00771838
Message ID:
00771838
Vues:
42
Hi,

I have developed an Accounting Application in VFP7 that makes extensive use of VFP7's DBC including presistent relations, and referential integrity stored procedures.

I want to develope a shoping cart application that would insert, update, and delete data in my VFP7 accouting application. It would work directly with the tables in the DBC.

I want to use perl as the frontend for the application; because perl is so widely used/supported for web base apps, and because perl is portable across about every platform. At some point, I may make the shopping cart application available to users running other databases like DB2, Oracle, MSSQL, MySQL, Postgres, Sybase, Firebird, etc, and other platforms like linux, unix, etc. My main objective now is to provide internet support to my VFP7 accounting application in the form of a shopping cart web based app that inserts, updates, and deletes records directly in my VFP7 accounting application.

I have a problem when inserting, updating or deleting records in the VFP table using the perl DBI. The problem only occurs on tables that have referential integrity triggers. If there is an insert, update, or delete trigger, VFP7 always returns -1 with a "trigger failed" error. I have set the trigger to a procedure in the DBC which only has two lines as follows:
PROCEDURE test
RETURN .T.
Even this results in a "trigger failed" error being returned to my perl frontend. I have also entered the following in the trigger which results in the same "trigger failed" error:
iif(do_trigger=.T.,__ri_delete_clint(),"")
The only way I have managed to eliminate the "trigger failed" errors is to completely delete them from the tables. If the trigger is deleted, there is no problem and everything works beautifully. I have tried to pass through from perl a VFP7 SQL command to delete the VFP7 trigger progarmmically as follows:
DELETE TRIGGER ON clint FOR DELETE
Unfortunately, even this returns a "trigger failed" error.

I have also tried to use locale views which did not help. I also tried to use a remote view, but the DBC would not allow a remote view to connect with a table that is already a member of the DBC.

I do not want to sacrafice the persistent relations and RI in my VFP7 accounting application just to accommodate the perl shopping kart app.

Is it possible to work with VFP7 tables in a three tier application, using perl as the frontend/middle tier; when the VFP7 backend tables have triggers? If not, I will probably use postgres to write the shopping cart app and use a two tier VFP front-end to connect to a postgres backend for users that are not internet online shoppers.

If this is a VFP7 issue, as opposed to a programmer error, has this been addressed in VFP8?


LelandJ
Leland F. Jackson, CPA
Software - Master (TM)
smvfp@mail.smvfp.com
Software Master TM
Répondre
Fil
Voir

Click here to load this message in the networking platform