SqlConnection sqlcon = new SqlConnection();
sqlcon.ConnectionString = @"Data Source=(local);Initial Catalog=cleopatra;Integrated Security=True";
List checks = new List();
foreach (Control cont in this.groupBox1.Controls)
{
if (cont is CheckBox)
{
if (((CheckBox)cont).Checked == true)
{
checks.Add(((CheckBox)cont).Text.ToString() + " , ");
}
}
}
sqlcon.Open();
SqlCommand sqlcmd = new SqlCommand("INSERT INTO pateint (mm) VALUES ( '" + string.Join(" ", checks) + "')", sqlcon);
sqlcmd.ExecuteNonQuery();
sqlcon.Close();
MessageBox.Show("ok");
and it insert as ???? marks i make it nchar and collation arabic

Raja TRank #685 · 3.5K reputationPosted Sep 3, 2015, 10:18 PM EDT
Raja TRank #685 · 3.5K reputationPosted Sep 4, 2015, 4:41 PM EDT
ÃHmed Élkady29 reputationPosted Sep 4, 2015, 5:41 AM EDT
ÃHmed Élkady29 reputationPosted Sep 4, 2015, 6:17 AM EDT
ÃHmed Élkady29 reputationPosted Sep 4, 2015, 6:33 PM EDT
ÃHmed Élkady29 reputationPosted Sep 4, 2015, 7:48 PM EDT
Raja TRank #685 · 3.5K reputationPosted Sep 5, 2015, 1:14 AM EDT
ÃHmed Élkady29 reputationPosted Sep 5, 2015, 4:36 PM EDT
Raja TRank #685 · 3.5K reputationPosted Sep 5, 2015, 5:43 PM EDT
ÃHmed Élkady29 reputationPosted Sep 5, 2015, 5:53 PM EDT
Raja TRank #685 · 3.5K reputationPosted Sep 5, 2015, 6:00 PM EDT
Or
You can check in sqlserver Arabic language insert in db for testing like
Insert into tbltest(arabiclan) values ('&&&&$$$$-&')
Inserted or not please check it
Raja TRank #685 · 3.5K reputationPosted Sep 5, 2015, 6:03 PM EDT
Or
You can check in sqlserver Arabic language insert in db for testing like
Insert into tbltest(arabiclan) values ('&&&&$$$$-&')
Inserted or not please check it
ÃHmed Élkady29 reputationPosted Sep 5, 2015, 6:22 PM EDT
Raja TRank #685 · 3.5K reputationPosted Sep 5, 2015, 7:03 PM EDT
ÃHmed Élkady29 reputationPosted Sep 5, 2015, 7:05 PM EDT
Raja TRank #685 · 3.5K reputationPosted Sep 5, 2015, 7:06 PM EDT
When you retrieving data from db here write logic based on value check the check box.
Raja TRank #685 · 3.5K reputationPosted Sep 5, 2015, 7:07 PM EDT
ÃHmed Élkady29 reputationPosted Sep 5, 2015, 7:09 PM EDT
Raja TRank #685 · 3.5K reputationPosted Sep 5, 2015, 7:20 PM EDT
http://www.codeproject.com/Questions/810980/Insert-Checkbox-value-in-database-in-asp-net-cshar
http://www.aspsnippets.com/Articles/Save-Insert-CheckBox-value-to-Database-in-ASPNet-using-C-and-VBNet.aspx
ÃHmed Élkady29 reputationPosted Sep 5, 2015, 7:55 PM EDT
Raja TRank #685 · 3.5K reputationPosted Sep 5, 2015, 8:52 PM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Sep 5, 2015, 10:18 PM EDT
ÃHmed Élkady29 reputationPosted Sep 6, 2015, 7:48 AM EDT
ÃHmed Élkady29 reputationPosted Sep 6, 2015, 7:51 AM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Sep 6, 2015, 7:53 AM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Sep 6, 2015, 8:04 AM EDT