using oracle client server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brettokumar
    New Member
    • Jul 2008
    • 31

    using oracle client server

    hi i my pro im using orcale client server

    while i m using update query i run properly. but instead of query im using storeprocedure i can not execute it display error like 'invalid sql statement '

    if im execute that procedure in my pl/sql it run properly

    my code is like
    [code=cpp]
    public string exeQry(string qry)
    {


    int a;
    if (Con.State == ConnectionState .Closed)
    {
    Con.Open();
    }
    cmd = new OracleCommand(q ry, Con);
    a = cmd.ExecuteOrac leNonQuery();
    Con.Close();
    return Convert.ToStrin g(a);
    }[/code]
    Last edited by Frinavale; Sep 18 '08, 05:51 PM. Reason: added [code] tags
  • PRR
    Recognized Expert Contributor
    • Dec 2007
    • 750

    #2
    you may not have specified CommanadType.St oredProcedure.. .???

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      All the information you need on how to connect to Oracle databases and any other .NET controls can be found in the MSDN Library. This resource should get you pointed in the right direction....th ere are multiple articles on how to use controls like the OracleConnectio n Class to connect to Oracle databases....

      Some articles you might be interested areHow to call Oracle Stored Procedures and acccessing Oracle Stored procedures.

      -Frinny

      Comment

      Working...