Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
3
Reply
How to capture stored procedure query or print output in C#
Sudipta Saha
Jan 16 2018 4:09 PM
155
Reply
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?
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
Comparing an entered password with an asp.net Identity pwd
Grid View delete field got error