Advertisement
VladikOtez

Untitled

Oct 11th, 2016
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.60 KB | None | 0 0
  1.   OleDbConnection con = new OleDbConnection("Provider User ID= stud; Password= stud");
  2.  
  3.         private void Form1_Load(object sender, EventArgs e)
  4.         {
  5.  
  6.         }
  7.  
  8.         private void button1_Click(object sender, EventArgs e)
  9.         {
  10.             con.Open();
  11.             OleDbDataAdapter zap = new OleDbDataAdapter(" Select name_long From o_use_base_units WHERE (TO_CHAR(from_date,'YY')) = '16' AND (TO_CHAR(to_date,'YY')) = '50'" , con);
  12.             DataTable dt = new DataTable();
  13.             zap.Fill(dt);
  14.             dataGridView1.DataSource = dt;
  15.             con.Close();
  16.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement