If any body has some good links (examples), please post. I have oracle procedure. I would like to call that proc and capture results in a dataset and display in the grid.
thanks
nath
Printable View
If any body has some good links (examples), please post. I have oracle procedure. I would like to call that proc and capture results in a dataset and display in the grid.
thanks
nath
One of the good things about ADO.NET is that it is basically no different regardless of your data source. If you know how to call a sproc in SQL Server then you know how to do it in Oracle. You create a comand of the appropriate type, set its CommandType to StoredProcedure and its CommandText to the name of the sproc. In your case it will be an OracleCommand, e.g.This is exactly as it would be for SQL Server except everything begins with "Oracle" instead of "Sql". The implication is that ANY ADO.NET information is useful because all you have to do is change the data namespace and the corresponding types and it will work essentially "as is". There is plenty of information around for using ADO.NET, particularly with SQL Server.Code:OracleConnection connection = new OracleConnection("connection string here");
OracleDataAdapter adapter = new OracleDataAdapter("sproc name here", connection);
adapter.SelectCommand.CommandType = CommandType.StoredProcedure;
DataTable table = new DataTable;
adapter.Fill(table);
grid.DataSource = table;