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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OLEDB cannot support triggers? 1

Status
Not open for further replies.

eys

Programmer
Mar 5, 2001
28
MX
I have a VFoxPro DBC 8/9 with a table with update and insert triggers on it.

If I try to insert records using OLEDB, it fails. It seems that OLEDB cannot support VFox triggers. Is this correct?

Is there a way to solve this behavior or supress in runtime the triggers programatically?

Because we need the triggers running when the VFox App is working, but when we use a .NET component to insert records in the DB we dont need the triggering if its necesarilly.

Can some help? Rick? Ramani?

Thanks

Jose Carlos
 
Jose,

It seems that OLEDB cannot support VFox triggers. Is this correct?

I don't have any direct experience of this, but I have seen posts from other developers who have had the same problem.

Is there a way to solve this behavior or supress in runtime the triggers programatically?

One option would be to create a second database, using updateble local views in place of the tables. Point your OLE DB source to that database rather than the original one..

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
It seems that a mirror database using updatable views is a fine workaround.

Thanks for the post (i dont known what timezone do you have, but I post at 4:00am and you answer very quick at 4:49am.

Im still looking for a direct solution using triggers under OLEDB if their are supported. If not, I'll do what you said.

Thanks, and if somebody knows something about VFox OLEDB and triggers, please let me known.

Jose Carlos
 

Jose,

I post at 4:00am and you answer very quick at 4:49am.

You must be either very hard-working or suffering from insomnia. (It was mid morning here when I posted my reply.)

If you find out anything else about triggers under OLEDB, let us know. As I mentioned, other people have had this problem.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Jose,

The problems for me occured when I tried accessing other dbcs throught the SPs in the database. Also certain commands cause it to fail.

Did you get any error information back from the attempted OLEDB insert? All I got back was "Unexpected Error"! It took a long time to fix.

Regards

Chris
 
Chris,

I have the same problem to use OLEDB with VFox SP's, finally I build an VFox dll to receive SQL sentences and execute them inside the dll component.

This is the way I solve the problem of interoperability from .NET and VFox when I need SPs in the VFox side.

If you want I can post the code for the dll and a sample using it from .Net

Regards

Jose Carlos
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top