I have a stored procedure like this
- PROCEDURE PRC_ABCD (resultset_out out TYPES.cursorType)
- AS
- SELECT * FROM ABCD;
- END PRC_ABCD ;
And my C# code is like this
- string cnn = "connectionstring";
- OracleConnection conn = new OracleConnection(cnn);
- conn.Open();
- var cmd = adapter.CreateSpCommand(con, "PRC_ABCD");
- cmd = adapter.outField(cmd, "resultset_out", OracleDbType.RefCursor);
- using (var reader = cmd.ExecuteReader())
- {
- while (reader.Read())
- {
- yield return Total.FromDataReader(reader, vProductCount, vProductAreaCount, vMonitoredByCount, customerCount);
- }
- }
My question is how do I get to see the results of PRC_ABCD into console message or how do I get to print the query SELECT * FROM ABCD?Anybody have any info about this?
Sudipta SahaPosted Jan 19, 2018, 3:46 PM
Suraj KumarPosted Jan 17, 2018, 5:00 AM
Dharmraj ThakurPosted Jan 17, 2018, 2:32 AM
If you are looking to static print query then Change your stored procedure like below and featch that column in c# as usual...