1
- Imports System.ComponentModel
1
+ Imports System.ComponentModel
2
2
Imports System.Data.Common
3
3
Imports Oracle.DataAccess.Client
4
4
@@ -75,9 +75,13 @@ Public Class Statement
75
75
Dim sqlParamValue As Object
76
76
For Each prop As PropertyDescriptor In TypeDescriptor.GetProperties(sqlParams)
77
77
sqlParamValue = prop.GetValue(sqlParams)
78
+ If (sqlParamValue Is Nothing ) Then
79
+ sqlParamValue = DBNull.Value
80
+ Else
81
+ sqlParamValue = Me .getPossibleUnderlyingEnumValue(sqlParamValue)
82
+ End If
78
83
Me ._cmd.Parameters.Add(
79
- prop.Name,
80
- If ((sqlParamValue Is Nothing ), DBNull.Value, sqlParamValue)
84
+ prop.Name, sqlParamValue
81
85
)
82
86
Next
83
87
End If
@@ -87,11 +91,16 @@ Public Class Statement
87
91
''' </summary>
88
92
''' <param name="sqlParams">Dictionary with named keys as Oracle statement params without any '@' chars in dictionary keys.</param>
89
93
Protected Overrides Sub addParamsWithValue(sqlParams As Dictionary( Of String , Object ))
94
+ Dim sqlParamValue As Object
90
95
If ( Not sqlParams Is Nothing ) Then
91
96
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
92
102
Me ._cmd.Parameters.Add(
93
- pair.Key,
94
- If ((pair.Value Is Nothing ), DBNull.Value, pair.Value)
103
+ pair.Key, sqlParamValue
95
104
)
96
105
Next
97
106
End If
0 commit comments