Goran Bibic

Goran Bibic

  • 484
  • 2.9k
  • 198.5k

System.dbnull.value null? APP not start if column null

Mar 14 2018 5:25 PM
If is Column 1, Column 3 or Column 4 null app not start...

How tu insert in this code for system db null or recomandition???
 
  1. openCon.Open();  
  2. using (SqlDataAdapter querySaveStaff = new SqlDataAdapter(saveStaff, cs))
  3. {  
  4.      DataTable dt = new DataTable();  
  5.      querySaveStaff.Fill(dt);  
  6.      prijava_radnikaDataGridView.DataSource = dt;  
  7.      prijava_radnikaDataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
  8.      prijava_radnikaDataGridView.Columns[0].Visible = false;  //id  
  9.      prijava_radnikaDataGridView.Columns[1].FillWeight = 80;  //redni broj  
  10.      prijava_radnikaDataGridView.Columns[2].FillWeight = 250;  //radnik  
  11.      prijava_radnikaDataGridView.Columns[3].FillWeight = 180;  //vrijeme prijave
  12.      prijava_radnikaDataGridView.Columns[4].FillWeight = 180;  //vrijeme odjave

Answers (18)