Disable Oracle trigger

jl39775

Registered User.
Local time
Today, 03:57
Joined
Dec 12, 2001
Messages
43
Does anyone know how to disable an Oracle trigger using VBA in Access 2000? If so please provide the code. I already have a connection and a recordset working with the Oracle DB. I just don't know how to disable the trigger.

Thanks,

James
 
If you mean "spot disable" the trigger from outside of the ORACLE program, you can't. ORACLE triggers don't know beans about VB or VBA, or any other ODBC caller.

From the outside, ORACLE is (and is SUPPOSED to be) a "black box." You give it a command, it does what it is told to do. And if someone told it to apply triggers in certain cases, it does that behind the scenes. To you on the outside it OUGHT to be transparent and invisible. So my question is, "What trigger?"

You might as well ask for a way to stop Access from incrementing an Autonumber field when creating a new record. That is the same class of request.

If you mean "permanently disable" the trigger, you have to send some SQL to ORACLE that has the effect of nullifying the trigger. But from Access this would be a waste of time. If you are the administrator of the ORACLE instance, you could do this from ORACLE's SQLplus interface, which works just fine.

If you are doing this any other way, dollars to donuts says you are trying to do something you shouldn't do. Triggers are put in a database for a reason. If you have a reason to bypass the trigger, talk with your ORACLE DBA. S/he might have some helpful comments, observations, and suggestions.
 
Let me ask my first question in a different way. Is there a way I can use SQLPlus commands in VB? Or is there anything in the VB Reference Library that I can use to use SQLPlus commands? If this is possible please help.

Thank you,

James
 
FYI,
I found that I can use the ADO command object to disable the trigger. All I did was use the "Alter ... disable" command in the command text and then execute the command object. This disable the trigger. I believe any Oracle command I've used in SQLPlus will work with the command object.

James
 

Users who are viewing this thread

Back
Top Bottom