ADODB OraOLEDB.Oracle and NULL value in Prepared Statement
Posted on 2006-06-15
I have an old VB6 app that was converted over to .NET. Most of the code still uses ADODB. We have upgraded our Oracle server to 10g which MSDAORA doesn't support without SP2.
I am finding that inserting a NULL value is causing the .execute to blowup.
If IsDBNull(sMissing_Item) Or sMissing_Item = Nothing Then
gobjaPrm(5).Value = DBNull.Value
gobjaPrm(5).Value = vTemp
So when it NULL value is inserted I get a weird error
at ADODB.CommandClass.Execute(Object& RecordsAffected, Object& Parameters, Int32 Options)
at Correspondence.ClassMassMail.InsertIntoTables_Mass(String& sPath, String& sCocode, String& sComp_Name, String& sSt_of_Dom, Int32& lUse_Code_ID, String& sMissing_Item, String& sCompany_Contact, Int32& sFiling_Period) in C:\Data\VB_NET\CORR.NET\ClassMassMail.vb:line 4140
The program ' Corr.exe' has exited with code 0 (0x0).
The blocks are actually the error. If you change the code to populate the field with a value instead of a NULL, everything works.
So the question is, is there another way to insert a NULL value with OraOLEDB.Oracle ?