This content has been marked as final. Show 5 replies
What version of OLEDB provider are you using? I tried this simple test using vbscript and 11203 oledb, and it worked for me..
'create table twocol(col1 number, col2 number); set con = createobject("adodb.connection") con.open "provider=oraoledb.oracle;user id=scott;password=tiger;data source=orcl" set cmd = createobject("adodb.command") cmd.activeconnection = con cmd.commandtext = "create or replace trigger twocoltrig " & _ "before insert on twocol " & _ "for each row " & _ "begin " & _ ":new.col2:=123;" & _ "end;" cmd.execute wscript.echo "done, no errors"
SQL> select status from user_triggers where trigger_name='TWOCOLTRIG';
Edited by: gdarling on Jan 31, 2013 8:25 AM
We are using 184.108.40.206 version of OLEDB.
when i executed the trigger
create or replace trigger twocoltrig
before insert on twocol
for each row
every thing went fine and the trigger was created in the database
After some investigation i changed my trigger to the following
Create Or Replace Trigger
For Each Row
:New.UPDATECOUNT := v_new_updatecount;
now too the trigger was created in the database.
so this has to do some thing with the referencing part of it and then using the new variables, though this is a valid syntax.
New As MyNew
Old As MyOld )
any suggestions on this?
Edited by: Murthy Gudivada on Jan 31, 2013 9:31 PM
Delphi application creates procedures and triggers in to MSSQL and Oracle database. We use ADO as the data access layer and Oracle.ole DB(oraoleDB.oracle.1) as provider when we insert procedures into an Oracle DB. Some of the triggers/Procedure are executed successfully but some do not. However there is no error via the ADO components when the command is executed. But they are simply not created in the database. Below is the sample code
for printer ink
Edited by: 986343 on Feb 5, 2013 2:39 PM