i use this code to update my data bout i get ?????? in the database when i write arabic litter what should i do for that
create procedure [dbo].[Updateproject]
@ProjectID int,
@Title nchar(10) ,
@Description text ,
@DueBy datetime ,
@Status nvarchar(50)
as
update dbo.uni_project set Status=@Status,Title=@Title,Description=@Description,DueBy=@DueBy where projectID = @ProjectID
return 0
GO
i i use this code in my form
string str = ConfigurationManager.ConnectionStrings["my"].ConnectionString;
using (SqlConnection sqlcon = new SqlConnection(str))
{
using (SqlCommand cmd = new SqlCommand("Createproject", sqlcon))
{
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("Title", txtTitle.Text);
cmd.Parameters.AddWithValue("Description", txtData.Text);
cmd.Parameters.AddWithValue("DueBy", cbDate.Text);
cmd.Parameters.AddWithValue("username", txtusername.Text);
sqlcon.Open();
cmd.ExecuteNonQuery();
MessageBox.Show("reminder set for" + cbDate.Text);
}
}
What I have tried:
update dbo.uni_project set Status=@Status,Title=N+@Title,Description=N+@Description,DueBy=@DueBy where projectID = @ProjectID
bout i didn't work