Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trigger Failed database error

Status
Not open for further replies.

rnathan

Programmer
Jun 27, 2002
41
0
0
US
Hi all

I have a major database problem in my hands and I just don't know how to resolve it.

My application has been created using VB 6.0 connecting to VFP6.0 database using MS VFP ODBC driver. I have 3 major tables in the database.

1. CustomerInfo (Parent table/CustId as prime key)
2. PropertyInfo (Parent Table/PropId as prime key)
3. Quotes (child table with CustId and PropId)

I have set the Ref Integ as 'Restricted' for Delete and Insert. Two days ago, one of the users notified me of 'Trigger Failed' (-2147217900) error but kept entering data anyway. For all the records the users entered since the error, the DB has recorded data only in the child table and not in the parent tables.

Is it possible to recover the data?
what was the cause ?
What can I do to prevent this error in the future?

Thanks in advance.

Rita



 
Rita,
I've never used VFP OBDC to update a database, but I do know that it's critical that you be using the latest (last) version of the driver - 6.1.8629.1, you can get it at You might want to consider using the VFP OLE DB provider, it's a lot newer. The current OLEDB Driver is at - While it's listed as for VFP 8.0, it works on ALL versions of FoxPro tables and databases. This version of VFPOLEDB.DLL was released just last week (2/9/2004).

Just curious why your application doesn't stop / take corrective measures when you get an error like this?

Rick
 
Rick,

Yes, I'm using the latest version of VFP ODBC driver. Regarding VFPOLEDB, I was under the impression that you have to have VFP 8.0. Thanks for the info.

Once the error occured, the application did not save any of the info entered for that particular quote. It exited. Because the trigger failed on 'Insert' and stayed that way, other users were able to save info in the child table. I don't know how to check if the database is corrupted or not before saving records.

Rita
 
Rita,

Regarding VFPOLEDB, I was under the impression that you have to have VFP 8.0.

You might be getting mixed up with the fact that an OleDB driver (or, rather, provider) is supplied with VFP 8.0. But that doesn't mean that you need VFP 8.0 to act as a client to that provider. In fact, any version of VFP can do that.

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top