none
problem with inserting arabic text in sql server using linq generated classes

    Question

  • Hello ALl ,

    i'm using LINQ generated classes to insert data in database , but

    when i tried to insert arabic text it changed to ???? in database although i insert 2  arabic texts , one of them inserted correctly  and the second one damaged 

    i tried to change collation in db but it didn't affect anything 

    can anyone help me in this issue please ? 


    Kareem Naguib

    • Moved by Bob BeaucheminMVP Tuesday, May 22, 2012 6:02 PM Moved to a more appropriate forum for best response. If this is a LINQ to SQL question and not EF, there is a separatre forum for that as well. (From:.NET Framework inside SQL Server)
    Tuesday, May 22, 2012 5:25 PM

Answers

  • Hello Allen

    sorry for late in reply

    and also thanks for your reply ,

    Yes , i have solved it , the problem was because of the data type of field in DB , it was text and it should be ntext , and after changing thee data type in db i had to change it also in the LINQ generated classes , then thanks god because  it works correctly :)


    Kareem Naguib

    Friday, May 25, 2012 2:52 AM

All replies

  • Hi Kareem Mohamed Naguib,

    Welcome to MSDN Forum.

    Could you please post the code of the class which Entity Framework generated and the code you do inserting operation here? This is, so I can help you more effectively.

    Best Regards


    Allen Li [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, May 23, 2012 3:35 AM
  • Hi Kareem Mohamed Naguib,

    Have you solved the issue? I look forward to hearing from you.

    Best Regards


    Allen Li [MSFT]
    MSDN Community Support | Feedback to us

    Friday, May 25, 2012 2:40 AM
  • Hello Allen

    sorry for late in reply

    and also thanks for your reply ,

    Yes , i have solved it , the problem was because of the data type of field in DB , it was text and it should be ntext , and after changing thee data type in db i had to change it also in the LINQ generated classes , then thanks god because  it works correctly :)


    Kareem Naguib

    Friday, May 25, 2012 2:52 AM
  • Hi Kareem Mohamed Naguib,

    I'm glad to hear that you have solved the issue and thanks for your sharing. :)

    Best Regards


    Allen Li [MSFT]
    MSDN Community Support | Feedback to us

    Friday, May 25, 2012 2:57 AM