Precompilers and OCI (MOSC)

MOSC Banner

positional bind in OCI or using array interface

edited Jun 8, 2015 8:34AM in Precompilers and OCI (MOSC) 10 commentsAnswered ✓

I'm in the course of doing some changes in the way I upload data into an Oracle Database using OCI.

At present I'm building single INSERT INTO TABLE (  :1,:2,...:300) VALUES ( 1,"long text"... etc. etc. ) and send this as

OCIStmtPrepare() followed by a OCIStmtExecute().

During this I'm getting an ORA-01704 since the text exceeds 4000 characters.

So I'm thinking about changing the bind method to BindByPosition and put the data into bind variables.

Also I would like to put the data in an array first and send only one INSERT statement hoping that  this also may speed up things.

Could someone give me some starting aid, maybe a sample code piece or so?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center