String^ param = System::Convert::ToString(comboBox1->SelectedItem);
String^ q = "select * from telekanal.channel where channel.title ="; MySqlCommand^ query = gcnew MySqlCommand(q + param,connect);

When performing swears in quotes at the end in pr. Q

You have an error in your SQL syntax; check it out.

  • 1) What's in param ? Print the resulting string ( q+param ), for sure it is incorrect - param not enclosed in quotes 2) use placeholders and forget about the formation of strings for requests directly. - PinkTux
  • @pinktux corrected - pride
  • what corrected? I do not see the contents of param, and I do not see how this string in quotes lies. That is, it should: where channel.title="foo" . And you probably do not have these quotes: where channel.title= foo`. - PinkTux

0