using System; using System.Data; using System.Windows.Forms; using System.Data.OracleClient; namespace PartialUpdateReport { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { string strConn = "User Id=liverw;Password=fa2aU7Vu7;Data Source=(DESCRIPTION=" + "(ADDRESS=(PROTOCOL=TCP)(HOST=ukdbt9Ltadb01.dotcom.org)(PORT=1521))" + "(CONNECT_DATA=(SID=DBT9LTF)));"; OracleConnection conn = new OracleConnection(); //OdbcConnection conn = new OdbcConnection(); conn.ConnectionString = strConn; conn.Open(); OracleCommand cmd = new OracleCommand(); cmd.Connection = conn; cmd.CommandText = "Select * from liverw.tbl_change_log"; cmd.CommandType = CommandType.Text; OracleDataAdapter da = new OracleDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds); conn.Close(); MessageBox.Show(ds.Tables[0].Rows[0][1].ToString()); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)