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;
myCommand.Parameters.Add(Param2);
stored proc:
ALTER PROCEDURE
dbo.InputKat
@parId
int,
@textKat
text
AS
insert into prodAll (idParent, ime)
values (@parId,@textKat)
RETURN
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.
None
0 Points
2 Posts
how to get east european chars in .mdf database using VWD 2005 EE?
Mar 31, 2006 05:38 AM|Jadran|LINK
Hi,
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;
myCommand.Parameters.Add(Param2);
stored proc:
ALTER PROCEDURE
dbo.InputKat@parId
int,@textKat
textAS
insert into prodAll (idParent, ime) values (@parId,@textKat) RETURNI hope someone will know what to do.
Jadran.
Contributor
4150 Points
5249 Posts
Re: how to get east european chars in .mdf database using VWD 2005 EE?
Mar 31, 2006 09:21 AM|Caddre|LINK
EDIT
Hi,
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.
http://msdn.microsoft.com/en-us/library/ms144250(SQL.90).aspx
http://sql.reproms.si/live/
http://msdn.microsoft.com/en-us/library/ms180175(SQL.90).aspx
None
0 Points
2 Posts
Re: how to get east european chars in .mdf database using VWD 2005 EE?
Mar 31, 2006 10:26 AM|Jadran|LINK
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.
Jadran.