locked
sqlce regional settings problem RRS feed

  • Question

  • Hi,

    I am working on windows mobile 5.0 device. Our software connect to sqlce local db and run sql commands. You can see an example below :

     

    using (var command = EntityBase.CreateCommand(Transaction))

    {

     

    command.CommandText =

    "INSERT INTO [Personel] (PersonelID, Isim, SoyIsim, TerminalSifre) VALUES (@PersonelID, @Isim, @SoyIsim, @TerminalSifre)";

    command.Parameters.AddWithValue(

    "@PersonelID", PersonelID != null ? (object)PersonelID : System.DBNull.Value);

    command.Parameters.AddWithValue(

    "@Isim", Isim != null ? (object)Isim : System.DBNull.Value);

    command.Parameters.AddWithValue(

    "@SoyIsim", SoyIsim != null ? (object)SoyIsim : System.DBNull.Value);

    command.Parameters.AddWithValue(

    "@TerminalSifre", TerminalSifre != null ? (object)TerminalSifre : System.DBNull.Value);

    command.ExecuteNonQuery();

     

    }

     

    When the regional settingg's language option set as english, I can work with sqlce without any problem. However,

    when the language is changed to "Turkish" the problem is appeared.

    sqlce engine change the sqlcommand to lowercase and than PersonelID is chaged to personelıd .

    And as you see there is no personelıd column in related table. Exception is throwd.

    Dou you have any suggestion or workaround ?

     

    Sincerely,

    Murat

     

     

     


    Programmer
    Wednesday, September 21, 2011 8:52 AM

Answers

  • Hello,

     

    I suggest you to debug this problem in the Turkish language. As far as I know, Windows mobile will change some codes when run on different language system. Therefore, I would suggest you to debug it. If this cannot be changed, we may use lowercase instead in all the SQL command.

     

    Best regards,

    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by Jesse Jiang Wednesday, September 28, 2011 7:50 AM
    • Marked as answer by Jesse Jiang Tuesday, October 4, 2011 3:18 AM
    Friday, September 23, 2011 6:51 AM
  • Hi Murat,

     

    I marked my reply as answer, if your issue have not been solved please unmark it and update more information about this issue.

     

    Best regards,

    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by muratdp Wednesday, November 2, 2011 6:45 AM
    Tuesday, October 4, 2011 3:18 AM

All replies

  • Hello,

     

    I suggest you to debug this problem in the Turkish language. As far as I know, Windows mobile will change some codes when run on different language system. Therefore, I would suggest you to debug it. If this cannot be changed, we may use lowercase instead in all the SQL command.

     

    Best regards,

    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by Jesse Jiang Wednesday, September 28, 2011 7:50 AM
    • Marked as answer by Jesse Jiang Tuesday, October 4, 2011 3:18 AM
    Friday, September 23, 2011 6:51 AM
  • Hi Murat,

     

    I marked my reply as answer, if your issue have not been solved please unmark it and update more information about this issue.

     

    Best regards,

    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by muratdp Wednesday, November 2, 2011 6:45 AM
    Tuesday, October 4, 2011 3:18 AM
  • Hi,

     

    The Succested workaround you mentioned is aplicable. However, I hoped that there could be a fix or solution in SQLCE site.

     

    Murat,

     

     


    Programmer
    Wednesday, November 2, 2011 6:51 AM