Note that there are some explanatory texts on larger screens.

plurals
  1. POCalling an Oracle stored procedure in C# using "Oracle.DataAccess" (with a parameter)
    primarykey
    data
    text
    <p>So I'm trying to call an Oracle stored procedure from my C# .NET application. Most online references I can find suggest "using System.Data.OracleClient;", but .Net 3.5 doesn't recognize that namespace so I'm using "Oracle.DataAccess.Client" instead.</p> <p>Here's some paraphrasing of my code below, with a previously setup and tested OracleConnection called 'myConn' already filled with parameter ':arg_myArg' (it's a number, if that matters):</p> <pre><code>command.Connection = myConn; command.CommandType = CommandType.StoredProcedure; command.CommandText = "exec mySchema.myProc(:arg_myArg)" command.ExecuteNonQuery(); </code></pre> <p>The trick is that <strong>the procedure returns nothing by design</strong>, it simply populates a different table which I pull from. However, when I try to run the code above, I get a 'OracleException' on the final line and gives this error:</p> <pre><code>ORA-06550: line 1, column 13: PLS-00103: Encountered the symbol "MYSCHEMA" when expecting one of the following: := . ( @ % ; The symbol ":=" was substituted for "MYSCHEMA" to continue. </code></pre> <p>Removing the "exec" from the command gives this error instead:</p> <pre><code>ORA-06550: line 1, column 8: PLS-00801: internal error [22503] ORA-06550: line 1, column 8: PL/SQL: Statement ignored </code></pre> <p><strong>Any ideas?</strong> I'd be happy to clarify anything</p> <p>This is my first time posting on stackoverflow.com and my last week at this job, so I appreciate your understanding and relative haste with figuring this out</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload