Goran Bibic

Goran Bibic

  • 482
  • 2.9k
  • 195.4k

Query value to textbox c#

May 31 2018 2:35 PM
I have result System.Data.SqlClient.SqlDataReader

Some help?
  1. private void ukupno_bez_pdv_roba()  
  2. {  
  3.     SqlConnection con2 = new SqlConnection(cs);  
  4.        string sqlquery = ("select * from mp_racun_roba where tip_robe = 'Roba (Generalno)' and id=" + id_fakture); 
  5.     SqlCommand command = new SqlCommand(sqlquery, con2);  
  6.     con2.Open();  
  7.     SqlDataReader sdr = command.ExecuteReader();  
  8.   
  9.     roba_bez_pdvTextBox.Text = sdr.ToString();  
  10.     con2.Close();  
  11. }

Answers (6)