Re: Anyone know how to call an Oracle function from C#?





"Steve Kershaw" <steve_kershaw@xxxxxxxxx> wrote in message news:1169226586.195498.27980@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
David,

Thanks that worked! However, it only works with
System.Data.OracleClient NOT Oracle.DataAccess.Client. When will Oracle
get with the program!?


Well, you can always just use CommandType.Text. And set command text to

string sql = @"
begin
:p_rv := HDB.PRL_PAY_PERIOD_PAYROLL_PKG.get_rec_final_qtr_count(:p_year,:p_quarter);
end;
";

This is the exact same block you can use in SqlPlus.


Then bind an output parameter and two input parameters. Be careful, ODP.NET used positional parameter binding by default.


David


.



Relevant Pages

  • Re: ORACLE DATES - How to use them
    ... Access or pass through query it is the same. ... I tried todate() but got errors when I tried to run, ... Access is capable of working with Oracle dates. ... exact version of Oracle ...
    (comp.databases.oracle.server)
  • Re: Interpreting cost on EXPLAIN PLAN
    ... Jonathan Lewis wrote: ... I will get the exact version when I get back to work tomorrow. ... cost or the total cost of the statement? ... > Now waiting on the publishers: Cost Based Oracle - Volume 1 ...
    (comp.databases.oracle.server)
  • Re: Encryption
    ... you determine the EXACT steps you need to take. ... This my be far off from what Oracle needs, ... I would assume that the Oracle designers have made this ... quite tricky to avoid hacking their passwords. ...
    (perl.beginners)
  • Re: RMAN Duplicate Question
    ... You did not see my suggesting that, because you have proven quite a few ... Heck, I pointed you to the exact place, by quoting the exact text. ... You should stop blaming Oracle and others for your own incompetency. ...
    (comp.databases.oracle.server)
  • Re: How do I connect to an Oracle database?
    ... Steve Kershaw wrote: ... Oracle to Microsoft SQL Server/Visual Studios! ... existing Oracle database to demonstrate that it can be done. ...
    (microsoft.public.dotnet.framework.aspnet)