DatabaseConnectivity(1) (1)
DatabaseConnectivity(1) (1)
Table created.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Oracle.DataAccess.Client;
namespace WindowsFormsApplication3
{
command1.CommandType = CommandType.Text;
OracleDataReader dr = command1.ExecuteReader();
dr.Read();
textBox1.Text = dr.GetString(0);
textBox2.Text = dr.GetString(1);
textBox3.Text = dr.GetString(2);
command1.Dispose();
conn.Close();
}
}
}
Next step: go to solution explorer-> references-> right click-> add references
command2.Dispose();
conn.Close();
}
}
Drag and drop DataGridView from toolbox on the form. Right click on
dataGridView->add column (number of columns based on your requirement)->
Change the header text (Eg: deptname, name of instructor) as you want it to appear
in the form.
connect();
comm1.Connection = conn;
da.Fill(ds, "instructor"); // DataAdapter.Fill (ds) here fetches the data from User
and fills in the DataSet ds.