SqliteDataReader[<string>] is Case-Sensitive #24011
Labels
area-adonet-sqlite
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
community-contribution
customer-reported
type-enhancement
Milestone
The SqliteDataReader lookup when using a string is case-sensitive:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.data.sqlite.sqlitedatareader.item?view=msdata-sqlite-5.0.0#Microsoft_Data_Sqlite_SqliteDataReader_Item_System_String_
Why? This isn't true of any of the other data readers that I've used including the Microsoft SQL Data reader.
https://docs.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqldatareader.item?view=dotnet-plat-ext-5.0#System_Data_SqlClient_SqlDataReader_Item_System_String_
To make matters worse, it is case-sensitive to the name of the column in the database, not what you select.
For example, if you have a table in your Sqlite database like the following:
CREATE TABLE test (testId INT)
The following code will error:
The lookup needs to use the same case as the table definition, not the query.
Microsoft.Data.Sqlite version: 5.0.2
Target framework: .Net Standard 2.0
The text was updated successfully, but these errors were encountered: