Results 1 to 5 of 5

Thread: sql server 2008 R2-VB.net

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2011
    Posts
    8

    Angry sql server 2008 R2-VB.net

    I don't have much experience with MS SQL server 2008 R2 but here is the issue if you would help me please:
    I have a table with a column/field (type : nvarchar) that stores text. The text is read from a text file and written to the database using vb.net application.
    The text in the text file contains Turkish characters such as the u with 2 dots on top(in the future it will be in different languages )
    When I open the table, the text in the column is not readable. It converts the Turkish special character to some unreadable characters.
    Is there anyway to make the text readable in the table?
    Thank you so much.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: sql server 2008 R2-VB.net

    When you say "When I open the table" are you talking about in SQL Server Management Studio or in an .NET app or something else? It would obviously be useful for us to see the relevant code regardless, so we can see what you're doing and what you might be doing wrong.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2011
    Posts
    8

    Re: sql server 2008 R2-VB.net

    I open the table in SQL server Management studio

  4. #4

    Thread Starter
    New Member
    Join Date
    Sep 2011
    Posts
    8

    Re: sql server 2008 R2-VB.net

    The .net app used only writes the text in the text file to the table. If the text is only ASCII (Aa to Zz , /...) I can read it in the table from SQL Mgt Studio fine. But if it has the turkish characters, those character appear in some weird unreadable by human.
    Thank you so much

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: sql server 2008 R2-VB.net

    Quote Originally Posted by jad0521 View Post
    The .net app used only writes the text in the text file to the table. If the text is only ASCII (Aa to Zz , /...) I can read it in the table from SQL Mgt Studio fine. But if it has the turkish characters, those character appear in some weird unreadable by human.
    Thank you so much
    Then the code of the .NET app is wrong. Show us the relevant code from the .NET app, as I asked in my previous post. If I had to guess (and I do) I would say that you are using an ASCIIEncoding object to read the data when you should be using some other type of Encoding that supports the data you need to read, e.g. UncodeEncoding.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width