[ gilespy @ 28.02.2006. 20:27 ] @
Pokusavam da kada otvorim formu dobijem popunjen datagrid rezultatima procedure koja predstavlja SELECT iskaz. private void procedura() { try { sqlCommandUcitaj.CommandType = CommandType.StoredProcedure; sqlCommandUcitaj.CommandText = "pregled_Nastavnik"; this.sqlConnection1.Open(); sqlCommandUcitaj.ExecuteNonQuery(); this.sqlConnection1.Close(); dataSet11.Clear(); dataSet11.AcceptChanges(); this.sqlDataAdapter1.Fill(dataSet11); dataGridNastavnik.SetDataBinding(dataSet11, "Nastavnik"); } catch(System.Exception exc) { MessageBox.Show(exc.Message); } } Problem je sto red sqlCommandUcitaj.CommandType = CommandType.StoredProcedure; prijavljuje gresku "The type or namespace Command Type could not be found...", a ako taj red izostavim onda dobijem upozorenje Fill:SelectCommand.Connection property has not been initialized. U cemu je stos? Hvala |