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
Rajeesh MenothPosted Sep 6, 2015, 12:04 PM
Rajeesh MenothPosted Sep 6, 2015, 11:53 AM
ÃHmed ÉlkadyPosted Sep 6, 2015, 11:51 AM
ÃHmed ÉlkadyPosted Sep 6, 2015, 11:48 AM
Rajeesh MenothPosted Sep 6, 2015, 2:18 AM
Raja TPosted Sep 6, 2015, 12:52 AM
ÃHmed ÉlkadyPosted Sep 5, 2015, 11:55 PM
Raja TPosted Sep 5, 2015, 11:20 PM
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 ÉlkadyPosted Sep 5, 2015, 11:09 PM
Raja TPosted Sep 5, 2015, 11:07 PM
Raja TPosted Sep 5, 2015, 11:06 PM
When you retrieving data from db here write logic based on value check the check box.
ÃHmed ÉlkadyPosted Sep 5, 2015, 11:05 PM
Raja TPosted Sep 5, 2015, 11:03 PM
ÃHmed ÉlkadyPosted Sep 5, 2015, 10:22 PM
Raja TPosted Sep 5, 2015, 10:03 PM
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 TPosted Sep 5, 2015, 10:00 PM
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 ÉlkadyPosted Sep 5, 2015, 9:53 PM
Raja TPosted Sep 5, 2015, 9:43 PM
ÃHmed ÉlkadyPosted Sep 5, 2015, 8:36 PM
Raja TPosted Sep 5, 2015, 5:14 AM
ÃHmed ÉlkadyPosted Sep 4, 2015, 11:48 PM
ÃHmed ÉlkadyPosted Sep 4, 2015, 10:33 PM
Raja TPosted Sep 4, 2015, 8:41 PM
ÃHmed ÉlkadyPosted Sep 4, 2015, 10:17 AM
ÃHmed ÉlkadyPosted Sep 4, 2015, 9:41 AM
Raja TPosted Sep 4, 2015, 2:18 AM