Working with Oracle-Datatype BLOB - unfriendly behaviour (using sequences during insert)

forum.gupta.bugreport (2005-2010)
holger.mueller
Austria
Posts: 198
Joined: 28 Aug 2017, 09:36
Location: Brunn am Gebirge, Austria

Working with Oracle-Datatype BLOB - unfriendly behaviour (using sequences during insert)

Post by holger.mueller » 19 Oct 2005, 22:52

 Posted by:  Holger Mueller, CSD 

Follwing unfriendly things happens:

SQLWIndows 3.1/PTF 4, sqlora32.dll
Oracle 9i/10i:

Table xxx
(
id NUMBER,
data BLOB
)

Sequence TEST

SQL.INI: USELOB=1

Call SqlPrepare
(
hSql,
"INSERT INTO xxx ( id, data ) VALUES ( test.nextval, :ilsData )

Call SqlSetLongBindDatatype ( 2, 23 )

Call SqlExecute ( hSql ) => Error (can only bind LONG bind to a LONG column)

Workaround:

Changing the order to "INSERT INTO xxx ( data, id ) VALUES ( :ilsData,
test.nextval)"

Call SqlSetLongBindDatatype ( 1, 23 )

Call SqlExecute ( hSql ) = > no error

Conclusion for me: don't use nextval before a blob-column

Return to “gupta.bugreport”

Who is online

Users browsing this forum: [Ccbot] and 0 guests