Skip Headers

Oracle® Objects for OLE Developer's Guide
10g Release 1 (10.1)

Part Number B10118-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Feedback

Deleting Rows

The following example uses the CreateSQL method to delete rows from the emp table.

Set OO4OSession = CreateObject("OracleInProcServer.XOraSession")

Set EmpDb = OO4OSession.OpenDatabase("ExampleDb", "scott/tiger", 0)

EmpDb.Parameters.Add "ENAME", "JONES", ORAPARM_INPUT

Set sqlStatement = EmpDb.CreateSQL ("DELETE from emp

WHERE ename = :ENAME", 0& )

To delete another row from the emp table, the parameter is value changed and the SQLStatement object is refreshed.

EmpDb.Parameters("ENAME").Value = "KING"

sqlStatement.Refresh