TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ÃHmed Élkady
NA
29
2.5k
problem with checkbox and arabic when insert to sql server
Sep 4 2015 1:05 AM
i had a group of check boxes that insert the checked values in 1 row each time by this code
SqlConnection sqlcon = new SqlConnection();
sqlcon.ConnectionString = @"Data Source=(local);Initial Catalog=cleopatra;Integrated Security=True";
List<string> checks = new List<string>();
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
Reply
Answers (
26
)
How to speech Thai in VB.net?
how can update exe from server to client Machine?