DataTable dt = new DataTable(); //Open Connection try { string conHostName = "172.21.0.45"; string conPort = "1522"; string conDatabase = "ora11gv4"; string _dbUserName = "ScibasePD"; string _dbPwd = "ScibasePD"; string conStr = string.Format("Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST={0})(PORT={1})))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME={2})));User Id={3};Password={4};", conHostName, conPort, conDatabase, _dbUserName, _dbPwd); OracleConnection con = new OracleConnection(conStr); con.Open(); // define Command using (OracleCommand cmd = new OracleCommand()) { //// create & define the parameter //var refCursorParam = new OracleParameter(); //refCursorParam.ParameterName = ""; //refCursorParam.OracleType = OracleType.Cursor; //refCursorParam.Direction = ParameterDirection.Output; cmd.Connection = con; cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "REPORTS.GET_DAILY_STATUS"; //define the data adapter and fill the dataset using (OracleDataAdapter oda = new OracleDataAdapter(cmd)) { oda.Fill(dt); } } bindingSource1.DataSource = dt; } catch (Exception ex) { throw ex; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)