1- Imports  System.ComponentModel 
1+ Imports  System.ComponentModel 
22Imports  System.Data.Common 
33Imports  Oracle.DataAccess.Client 
44
@@ -75,9 +75,13 @@ Public Class Statement
7575            Dim  sqlParamValue  As  Object 
7676            For  Each  prop  As  PropertyDescriptor  In  TypeDescriptor.GetProperties(sqlParams) 
7777                sqlParamValue  =  prop.GetValue(sqlParams) 
78+                 If  (sqlParamValue  Is  Nothing )  Then 
79+                     sqlParamValue  =  DBNull.Value 
80+                 Else 
81+                     sqlParamValue  =  Me .getPossibleUnderlyingEnumValue(sqlParamValue) 
82+                 End  If 
7883                Me ._cmd.Parameters.Add( 
79-                     prop.Name, 
80-                     If ((sqlParamValue  Is  Nothing ),  DBNull.Value,  sqlParamValue) 
84+                     prop.Name,  sqlParamValue 
8185                ) 
8286            Next 
8387        End  If 
@@ -87,11 +91,16 @@ Public Class Statement
8791    ''' </summary> 
8892    ''' <param name="sqlParams">Dictionary with named keys as Oracle statement params without any '@' chars in dictionary keys.</param> 
8993    Protected  Overrides  Sub  addParamsWithValue(sqlParams  As  Dictionary( Of  String ,  Object )) 
94+         Dim  sqlParamValue  As  Object 
9095        If  ( Not  sqlParams  Is  Nothing )  Then 
9196            For  Each  pair  As  KeyValuePair( Of  String ,  Object )  In  sqlParams 
97+                 If  (pair.Value  Is  Nothing )  Then 
98+                     sqlParamValue  =  DBNull.Value 
99+                 Else 
100+                     sqlParamValue  =  Me .getPossibleUnderlyingEnumValue(pair.Value) 
101+                 End  If 
92102                Me ._cmd.Parameters.Add( 
93-                     pair.Key, 
94-                     If ((pair.Value  Is  Nothing ),  DBNull.Value,  pair.Value) 
103+                     pair.Key,  sqlParamValue 
95104                ) 
96105            Next 
97106        End  If 
0 commit comments