So it is not only for Oracle, but for any database (SqlBase, Sql Server etc).
Ticket # 4311798
TD 7.2.1 throws an error when inserting LONG RAW or BLOB data using Oracle.
This error is given:
Code: Select all
ORA-01461: can bind a LONG value only for insert into a LONG column
The same code does work ok in TD 7.2.0
Strangely, we see a difference in behavior when running in IDE where the code is part of the main source.
When running from EXE or the SQL is executed from a dynalib (apd) there is no error and the data is saved into database. When running our application in IDE, no error is given.
I tried to create a full testcase to reproduce it.
The testcase shows the error in all cases. So running from IDE, from EXE or when code is in dynalib.
I could not get the sample running fine from EXE or APD.
But at least, the sample shows the issue.
The attached testcase is self-contained. So it holds all needed files and will create/drop the needed table/columns
automatically, so long as the given db user has the rights.
1) Use the source OracleLongInsertSelect.apt
2) Change the database,user and password in the Init function of the main form
3) Change the sql.ini to be used for the oracle database
4) Press the upper button to get the Oracle client/server version (when needed)
5) Press "Insert DB" to insert a bitmap into the database
See that on TD 7.2.0 no error is given and insert is ok.
See that on TD 7.2.1 the mentioned error is given
To test other combinations, use the "select DB" button to fetch the previously inserted image from database and display on screen.
Use the radio buttons LONG RAW and BLOB to use these types accordingly.
The lower part of the form does text inserts.
This situation was tested on Oracle client 22.214.171.124.0 and server Oracle Database 19c Standard Edition 2 Release 126.96.36.199.0 - Production