none
ArgumentException from DataRow.Item() in Turkish Window server 2008 installtion RRS feed

  • Question

  • Our software was installed on (customer site) Window Server 2008 R2 Foundation in Turkey (So locale is set to Turkish, and thus all menus and messages are displayed in Turkish). We are using SQL server 2005 express. The database collation is SQL_Latin1_General_CP1_CI_AI (as in our other English installed sites).

    Our code query the database with a simple query: select * form tableName where callid='variable' (callid is our primary key, however the column name in the database is CallID, column type is varchar(60)), using SqlDataAdapter.Fill() method to fill our untyped DataSet.

    We yield the DataRow object from DataSet.Tables[0].Rows[0]. We pass this DataRow object to other methods and we use DataRow.Item (String) to get the columns values. We have several columns that we get their values this way with no problems. However for one particular column we get

    ArgumentException: <column name> column does not belong to table Table

    This column is our callid column! When we change the column name in database to callid, or CalliD (Original column name is CallID) we don't get the exception. I've seen this article called Introduce the Turkish I issue and as I understand it the issue the article address is when collation = TURKISH_CI_AS.

    The problem isn't occurring on the database side at all, but when the local code (DataSet, DataRow) is looking for the column. Is the DataSet object taking into account the system locale?

    I've also checked the DataTable.CaseSensitive property which is false.

    What am I missing here? I'd appreciate any helpful input.

    Thanks, Ilan

    P.S.

    Originally posted on StackOverflow although I've edited it a bit.

    Thursday, October 6, 2011 7:26 AM

All replies