SqlCommand cmd = new SqlCommand("set identity_insert posudbe on INSERT INTO Posudbe (datumPosudbe,idClana,idNaslova) VALUES (@datumPosudbe,@idClana,@idNaslova) set identity_insert posudbe off", conn); cmd.Parameters.Add("@idClana", SqlDbType.Int).Value = gvClanovi.SelectedRow.Cells[0].Text;
Failed to convert parameter value from a String to a Int32
cmd.Parameters.Add("@idClana", SqlDbType.Int).Value = gvClanovi.SelectedDataKey.Value.ToString();
cmd.Parameters.Add("@idClana", SqlDbType.Int).Value = int.Parse(gvClanovi.SelectedRow.Cells[0].Text);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)