dotnet / dotnet/dotnet-api-docs
Reference to DBNull.Value in OdbcDataReader.Item[]'s value
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
Now, [the docs for OdbcDataReader.Item[]](https://docs.microsoft.com/en-US/dotnet/api/system.data.odbc.odbcdatareader.item?view=netframework-4.5#System_Data_Odbc_OdbcDataReader_Item_System_Int32_)'s value say:
> The value of the specified column in its native format.
I think this is somehow confusing when dealing with null values in the database side. Which type can you expect? Maybe a null reference? In my opinion, adding a reference to DBNull.Value will help to make these cases clearer, specially for unexperienced ADO users.
I know about DBNull.Value by experience, but I don't know if ODBC data sources not being databases can return a different type if a field has no value.
Contributor guide
Assessment
This issue has not been assessed yet.