Skip to content

Commit 7d50783

Browse files
committed
Oracle FetchData(), FetchData<T>() - Check BFILE column is Not NULL
1 parent e375d95 commit 7d50783

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

QueryDB/Resources/Utils.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ internal static string GetBFileContent(OracleDataReader reader, int columnIndex)
7272
{
7373
string content = string.Empty;
7474
var bFile = reader.GetOracleBFile(columnIndex);
75-
if (bFile != null)
75+
if (bFile != null && !reader.IsDBNull(columnIndex))
7676
{
7777
bFile.OpenFile();
7878
byte[] buffer = new byte[bFile.Length];
@@ -103,7 +103,7 @@ internal static string GetBFileContent(OracleDataReader reader, string columnNam
103103
{
104104
int columnIndex = reader.GetOrdinal(columnName);
105105
var bFile = reader.GetOracleBFile(columnIndex);
106-
if (bFile != null)
106+
if (bFile != null && !reader.IsDBNull(columnIndex))
107107
{
108108
bFile.OpenFile();
109109
byte[] buffer = new byte[bFile.Length];

0 commit comments

Comments
 (0)