Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6937513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:22:21+00:00 2026-05-27T12:22:21+00:00

Our application uses H2Sharp to access a H2 database from C# (Framework v4). H2Sharp

  • 0

Our application uses H2Sharp to access a H2 database from C# (Framework v4). H2Sharp inherits DBDataAdapter and implements IDbDataAdapter. As such, what I am asking about most likely applies to SqlDataAdapter, but I wanted to clarify the environment details.

Recently we noticed an issue in accessing the same database on different computers. We have observed the following code sometimes works, sometimes throws an error:

DataRow row;
// Fill the row
String s = row["id"];

The error is “Column id does not belong to table Abcde”.

The application works on a computer running Win7 64-bit, Visual Studio 2010 with all the patches. Same binary and database copied to a similar computer gives this error. Interestingly, the code works OK if the line is changed to

String s = row["ID"];

The DataTable has the “CaseSensitive” property set to false so initially we could not figure out what is happening.

It turns out that the DataTable has a “Locale” property and this has a default of the logged user’s Locale (as set under the “Format” tab in the “Region and Language” control panel settings on Windows 7). On machines that it does not work, the user locale is set to Turkish and we are seeing a case of the “Turkish I problem” (*).

Now I understand the nature of the problem, I am trying to understand what options I have to solve it. I first thought about if there’s a way that I can specify the column names etc be compared in an Invariant culture but the data itself is compared in a given locale. H2 documentation is not very explicit about it but the way it is written, it sounds like the whole database is governed by one main setting. In addition, SELECT * FROM INFORMATION_SCHEMA.COLLATIONS does not return Unicode, so this option does not seem possible.

In addition, DataTable documentation also suggests the locale is to be used “for string comparisons within the table” so there does not seem to be an option to specify different behavior for column/table names vs user data.

I found this post that mentions this issue and the accepted solution was to use “I” character instead of “i” in the table/column names. However, I think this solution assumes that the code is doing a ToUpper() instead of ToLower() before string comparison, therefore it may be broken if DataTable code is modified in the future.

That post also has a suggested solution of setting SQL server settings to UTF-8. This looks like a more viable solution. However, I could not find a way to do it for H2 database (both because the setting seems to impact the whole database and there’s no UNICODE option).

I appreciate any input/help/guidance.

(*) Turkish I problem: In Turkish, ToUpper(i) == İ, ToLower(I) == (ı)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:22:22+00:00Added an answer on May 27, 2026 at 12:22 pm

    We went ahead with the suggested solution of using all capital letters in the table/column names. Even though this assumes that the code behind the DataTable is doing a ToUpper() instead of ToLower() for case-insensitive comparison, it seemed unlikely that this code will change its behavior (which would break all the code that uses DataTable with case-insensitive comparison).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our application uses H2Sharp to access a H2 database from C# (Framework v4). Recently
We have a requirement from a client to protect the database our application uses,
Our application uses a large product database that is updated once a day. Updates
Our application (sadly) uses an MDB back-end database (I.e. JET engine). One of the
Our application uses an SQLite database file to hold some data in it. The
Our application at work uses the ExtJS (Sencha) framework for the UI. The problem
Our application uses libcurl for HTTP, and we want to get access to Internet
Our application uses the MapMaker class from Google collections, and we're getting the exception
Our application uses POI API (poi-2.5.1.jar) for reading from excel files and to create
I decided to start writing unit tests in our application. It uses Entity Framework

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.