I'm completely new to Devart and looked over the FAQ and searched the forum. I found a lot of posts regarding the bug with the "Specified cast is not valid" exception when searching for an entity. Apparently this has been fixed in version 7.3, however I get this exception every time I submit any changes to the data context.
I just inherited a huge project using dotConnect. Due to infrastructure changes I had to migrate from version 5.2.5 to 7.4.146.0 and since migration I get the following exception, whenever I submit any changes to the context (in this case I try to delete from a table):
Code: Select all
Specified cast is not valid.
at Devart.Data.Oracle.OracleUtils.a(Object A_0, OracleDbType A_1, Boolean A_2)
at Devart.Data.Oracle.OracleParameter.e(Object A_0)
at Devart.Data.Oracle.OracleParameter.get_OracleValue()
at E247.CMS.Web.Global.oracleMonitor1_TraceEvent(Object sender, MonitorEventArgs e) in Global.asax.cs:line 45
at Devart.Common.DbMonitor.OnTraceEvent(Object sender, MonitorEventArgs e, Boolean parentMessage)
Code: Select all
context.LmCategories.DeleteOnSubmit(lmCategory);
context.SubmitChanges();
Code: Select all
DELETE FROM MUSIC_247.LM_CATEGORIES WHERE CATEGORY_ID = :key1
AND ATTACH_ID = :key2
AND SEQ_NO = :chk1
AND ((:nullchk2 = 1 AND TEXT_ID IS NULL) OR (TEXT_ID = :chk2))
AND ((:nullchk3 = 1 AND FILTER_TYPE IS NULL) OR (FILTER_TYPE = :chk3))
AND ((:nullchk4 = 1 AND FILTER_VALUE IS NULL) OR (FILTER_VALUE = :chk4))
DbType is Int32
OracleDbType is Integer
I have the feeling, that this is not a bug in dotConnect, but in our code, but I have no experience with Devart so far and don't know where the command comes from in the first place.
Any tips or hints?
Greetings,
Jan