Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> PLSQL Commit & ODP.net arraybind, Not Quite right?

PLSQL Commit & ODP.net arraybind, Not Quite right?

From: Eric <emfortin_at_comcast.net>
Date: Sun, 25 Apr 2004 14:36:55 GMT
Message-ID: <b2Qic.19524$0u6.3121964@attbi_s03>

I used the example in technet.oracle.com as my template:

http://otn.oracle.com/sample_code/tech/windows/odpnet/howto/arraybind/index.html

If I use ODP.net arraybind to insert an array of values via a pl/sql stored procedure and do not put a commit in the PL/SQL procedure that inserts the rows, I only get the last row in the array.

I'm assuming that the other rows are automatically being rolled back... (The ExecuteNonQuery returns the number of rows I thought would be inserted, despite that only one row is created)

If I put a commit in the proc (as is in the example), all the rows are inserted as desired.

My problem is that I only want the rows inserted if all the rows can be created.

(I thought commit in a pl/sql proc is deigned bad practice anyway...)

Is this a bug or by design? Received on Sun Apr 25 2004 - 09:36:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US