how to get east european chars in .mdf database using VWD 2005 EE? RRS feed

  • Question

  • User-23473836 posted


    I am creating an web aplication for some people here in Croatia that uses sql database. Naturaly they need croatian letters and that is my big problem.

    I have form on a page that uses charset: windows-1250 and the data is posted to a page that also have that charset. Data that arrives is ok but when i try to store it in database croatian letters disappear.

    I couldn't find where to set charset of database and I am using stored procedure with parameter to insert data into it.

    .net code:

    SqlParameter Param2;

    Param2 = new SqlParameter("@textKat", SqlDbType.Text);

    Param2.ParameterName = "@textKat";

    Param2.IsNullable = false;

    Param2.SqlDbType = SqlDbType.Text;

    Param2.Direction = ParameterDirection.Input;

    Param2.Value = katNew;


    stored proc:

    ALTER PROCEDURE dbo.InputKat

    @parId int,

    @textKat text


    insert into prodAll (idParent, ime) values (@parId,@textKat)


    I hope someone will know what to do.


    Friday, March 31, 2006 5:38 AM

All replies

  • User1416329745 posted



    Sorry I did not add the T-SQL Collation link, it is the last link.

    I can help first Windows codepage is different from SQL Server codepage because in SQL Server every European langauge uses a different codepage because accented letters require different code page.  You use NChar, NVarchar, NCharMax and NVarcharMax which are multibytes but you also need to do column level collation in SQL Server for your language and it should be fixed.

    And you know one of the best SQL Server resources is the Slovania SQL Server user group site, their site was three languages in the 1990s.  Run a search for Collation and Column level Collation  in SQL Server BOL (books online).  The first link below should get you in the right direction and the second link is the Slovania SQL Server user group, they cover both the Algebra end and the Calculus end of SQL Server including descriptive statistics.  Post again if you still need help.  Hope this helps.




    Friday, March 31, 2006 9:21 AM
  • User-23473836 posted

    Thanks for a quick answer.

    I found what was wrong, I used wrong collation, when I change it to Croatioan_CI_AS i worked perfectly.


    Friday, March 31, 2006 10:26 AM