Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Spool command with .Net

user556415Oct 1 2008 — edited Oct 2 2008
I use C# with System.Data.OracleClient.dll

I call a store procedure with OracleCommand and I want to log a full PL/SQL script about this store procedure.

for example the following code where I call a 'GetMagicNumber' store procedure:


public void InizializzaRichiesta()
{
using (OracleConnection OracleConn = new OracleConnection(_Ordini_StringConnection))
{

OracleConn.Open();
OracleCommand command = OracleConn.CreateCommand();
command.CommandType = CommandType.StoredProcedure;

command.CommandText = "GetMagicNumber";


command.Parameters.Add("Numero", OracleType.VarChar).Value = "1"
command.Parameters.Add("Value", OracleType.VarChar).Value = "2"

command.ExecuteNonQuery();
}
}


Internal I think it create the following PL/SQL text: exec GetMagicNumber("1","2")

Is there a method to get that text?


It is possible to use a spool command with C#?


thanks

Edited by: user556415 on 1-ott-2008 18.04
This post has been answered by SomeoneElse on Oct 1 2008
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 30 2008
Added on Oct 1 2008
3 comments
724 views