When I try to query objects, I end up with following error:
ORA-01461: can bind a LONG value only for insert into a LONG column
Could someone please help me on the cause and solution of the problem?
Ok, well, since you didn't show any code, I'll make a few assumptions here.
Based on the ORA-1461 error, it seems that you've specified a LONG datatype in a select statement? And you're trying to bind it to an output variable? Is that right? The error is pretty straight forward. You can only bind a LONG value for insert into LONG column.
Not sure what else to say. The error is fairly self-explanatory.
In general, it's a good idea to move away from LONG datatype to a CLOB. CLOBs are much better supported, and LONG datatypes really are only there for backward compatibility.
Here's a list of LONG datatype restrictions
Hope that helps.