Home » Developer & Programmer » Forms » INSERT IMAGE IN 10G DATABASE (10G,10.2,VISTA)
icon9.gif  INSERT IMAGE IN 10G DATABASE [message #333473] Fri, 11 July 2008 15:41 Go to next message
ossamakamel
Messages: 8
Registered: February 2007
Junior Member
Dear all
i make upgrade only the database from 8i to 10g the developer 6i
i have a prob in forms i have created and the users inserted data on it (image type)

ORA-01461: can bind a LONG value only for insert into a LONG column
i can't upgrade the developer to 10g now
so if there is any solution to solve such a prob that will be great
thanks alot in advance
Re: INSERT IMAGE IN 10G DATABASE [message #333610 is a reply to message #333473] Sun, 13 July 2008 10:36 Go to previous message
Kevin Meade
Messages: 2103
Registered: December 1999
Location: Connecticut USA
Senior Member
This error is telling you that your form tried to insert a LONG datatype from the form into a column in the database that is not defined as a LONG.

If your LONG columns in your database were converted to BLOBS then this might explain why you are getting this error.

I can think of a few ways that might get you around it:

Quote:
1) add another column to the table that is a long and insert into that one instead. You would do this:

a) add the new long columns
b) convert the BLOB to longs (not sure how)
c) rename the BLOB column to something else (see alter table on how to rename a column)
d) rename your new long column to the name you want
e) test your app
f) if app works the drop the BLOB column


Quote:
2) create a view in your database and use an instead of trigger to intercept inserts on the view and convert your long to a lob and back again as needed. This one is trickier because it requires you do both convert an incomming long to blob and do the reverse on query of converting the blob to long on the way out. Still, if you can find out how to do the conversions, this would work too.


Quote:
3) write an on-insert trigger in the form to manager the conversion on insert. You would still need to deal with data comming out of the table once more I figure using a view.


Again all these thoughts presume that some kind of column conversion occurred during your upgrade either by the oracle system, or by your DBA before/after the actual migration. This might not be true. Also, I do not work with LONGS too much anymore so this advice is subject to the well known HOMER syndrome.

Good luck buddy, this won't be an easy one. Kevin
Previous Topic: tabuler recoreds
Next Topic: how change the where clause in block?
Goto Forum:
  


Current Time: Sun Feb 09 06:00:58 CST 2025