problem on inserting non english values in DB
-
hi guys I have some problem in inserting non english values in AJAX method (in AJAX i send information on get method) :doh: my DB column type is : "ntext" (to allow non english) i checked , i get right data on server , but wrong data would inputed to the DB !!! :confused: some code is like that :
string res = Request["amount"].ToString() + "," + Request["price"].ToString() + "," + Request["year"].ToString() + "," + Request["month"].ToString() + "," + Request["day"].ToString() + "," + Session["code"].ToString() + "," + Request["kind"].ToString() + "," + "1" + ",'" + Request["comment"].ToString()+ "'";
string str = "INSERT INTO invest (amount,totalprice,year,month,day,personID,typeID,canedit,cms)VALUES(" + res + ")";
SqlDataSource1.InsertCommand = str;
SqlDataSource1.Insert();
Response.Write("اطلاعات وارد شد");
Response.End(); -
hi guys I have some problem in inserting non english values in AJAX method (in AJAX i send information on get method) :doh: my DB column type is : "ntext" (to allow non english) i checked , i get right data on server , but wrong data would inputed to the DB !!! :confused: some code is like that :
string res = Request["amount"].ToString() + "," + Request["price"].ToString() + "," + Request["year"].ToString() + "," + Request["month"].ToString() + "," + Request["day"].ToString() + "," + Session["code"].ToString() + "," + Request["kind"].ToString() + "," + "1" + ",'" + Request["comment"].ToString()+ "'";
string str = "INSERT INTO invest (amount,totalprice,year,month,day,personID,typeID,canedit,cms)VALUES(" + res + ")";
SqlDataSource1.InsertCommand = str;
SqlDataSource1.Insert();
Response.Write("اطلاعات وارد شد");
Response.End();check if the datatype of the column nvarchar?
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
-
check if the datatype of the column nvarchar?
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.