This answer help me to fix it link
I go to my "nameofapp">settings and i put the string charset=utf8 , and then i went on my database table and i put collation to utf8_bin and worked
Вопрос
Greek characters in database are like question marks("?????"). I can't find a solution. when I insert Greek letters in MySQL are like question marks. Tha collation in the talbe in mysql is utf8.
What i am doing wrong?
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
int col = this.dataGridView1.CurrentCell.ColumnIndex;
int row = this.dataGridView1.CurrentCell.RowIndex;
if (e.ColumnIndex == dataGridView1.Columns["priceoneDataGridViewTextBoxColumn"].Index)
{
string name = dataGridView1.Rows[row].Cells[col - 1].Value.ToString();
string pric= dataGridView1.Rows[row].Cells[col].Value.ToString();
//in this row i am getting the line ok
MessageBox.Show(name);
MessageBox.Show(pric);
lawyerspriceDataSet ds = new lawyerspriceDataSet();
lawyerspriceDataSetTableAdapters.reportTableAdapter daReport = new lawyerspriceDataSetTableAdapters.reportTableAdapter();
daReport.Fill(ds.report);
try
{
daReport.Insert(name, pric); //i save the info in the table
}
catch (Exception ex)
{
MessageBox.Show("error");
}
}
![enter image description here][1]
Решение
This answer help me to fix it link
I go to my "nameofapp">settings and i put the string charset=utf8 , and then i went on my database table and i put collation to utf8_bin and worked