[BulkInsert] Problems with BulkInsert in ORACLE database
Service icon
Forge component by Galter
Application Type

When used with an ORACLE database, the BulkInsert throws the exception "BulkInsert: Specified cast is not valid.".

This exception occurs with attributes of the type long integer.

This is the part of the code that throws the exception:

To fix this issue the data type int should be changed to Int64 or long.

Another important point when using an ORACLE database is to make sure that you don't use protected names in the attributes, such as "Number, Order...". The use of these names will throw an exception at the moment.

The development team should add in the code a protection for these cases, since it's possible to have a collumn, for example, named Number in ORACLE, just by using "Number".

Another problem was found when trying to use binary type with ORACLE. I did some tweaks to make the BulkInsert accept this data type too (and other minor fixes).

If anyone needs I'm attaching the part of the code that works with ORACLE, just copy it to the extension.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.