Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> INSERT creates duplicate records
Ok,
I am officialy going nuts. This is so simple, that I can't believe I didn't find anything on Google.
Database: Oracle8i Enterprise Edition Release 8.1.7.3.0
I create a table:
SQL> create table test (x varchar2(10));
I create an VB app with OO4O (Oracle InProc Server 3.0): Private Sub Command1_Click()
Dim oraSession As oraSession
Dim oraDatabase As oraDatabase
Dim oraSqlStmt As oraSqlStmt
Set oraSession = CreateObject("OracleInProcServer.XOraSession") Set oraDatabase = oraSession.OpenDatabase("dbname", "user" & "/" & "password", ORADB_ORAMODE)
Set oraSqlStmt = oraDatabase.CreateSql("INSERT INTO test (x) VALUES ('abc')", ORASQL_FAILEXEC)
oraSqlStmt.Refresh
Set oraSqlStmt = Nothing
End Sub
When I run this function, I get:
SQL> select * from test;
X
The INSERT was fired twice. No triggers involved or anything. The same INSERT in SQL Plus is executed only once.
Any ideas? Help is greatly appreciated...
Torsten Received on Mon Mar 17 2003 - 11:03:51 CST