こんにちは、vb を c シャープに変換するのに問題があります
Dim Query As String = "UPDATE F_Shqip SET Lika_Sh=@Fjalet_Sh WHERE Id_Sh=@Id_Sh"
Dim cmd As SqlCommand = New SqlCommand(Query, con)
cmd.Parameters.AddWithValue("@Lika_Sh", Trim(Me.txbLikaSh.Text))
cmd.Parameters.AddWithValue("@Id_Sh", Me.ListBox1.SelectedItem(0).ToString)
C シャープで:
string Query = "UPDATE F_Shqip SET Lika_Sh=@Lika_Sh WHERE Id_Sh=@Id_Sh";
SqlCommand cmd = new SqlCommand(Query, con);
//two lines with errors
cmd.Parameters.AddWithValue("@Lika_Sh", Strings.Trim(this.txbLikaSh.Text));
cmd.Parameters.AddWithValue("@Id_Sh", this.ListBox1.SelectedItem(0).ToString);