Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 737851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:46:09+00:00 2026-05-14T07:46:09+00:00

In the case of MSFT SQL Server 08, it is: odbcCommand = new OdbcCommand({call

  • 0

In the case of MSFT SQL Server 08, it is:

odbcCommand = new OdbcCommand("{call " + SP_NAME + " (?,?,?,?,?,?,?) }", odbcConn);

When I try to do the same thing for Oracle, I get:

OdbcException: ERROR [HYC00] [Oracle][ODBC]Optional feature not implemented.

Feel free to ask for clarification, and please help. I am using .Net 3.5, SQL Server 08, and Oracle 11g_home1.

P.S. The Oracle stored procedure does have some 3 more parameters, but I believe I am handling this in my code.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T07:46:10+00:00Added an answer on May 14, 2026 at 7:46 am

    I’m running .NET 3.5 and Oracle 10gR2. I’ve added an output parameter in response to your comment.

    Server, Uid, and Pwd have been changed to protect the innocent. Set them to appropriate values.

    My stored procedure:

    create or replace
    procedure test_proc(p1 in number, p2 in out varchar2) is
    begin
      p2 := to_char(p1 + to_number(p2));
    end;
    

    My test code:

    using System;
    using System.Data;
    using System.Data.Odbc;
    
    class OdbcTest
    {
        const string connectionString =
            @"Driver={Microsoft ODBC for Oracle};" +
            @"Server=MyTnsName;" +
            @"Uid=MySchema;" +
            @"Pwd=MyPassword;";
    
        public static string TryMe()
        {
            using (var odbcConn = new OdbcConnection(connectionString))
            using (var odbcCommand = odbcConn.CreateCommand())
            {
                odbcCommand.CommandText = "{ CALL test_proc(?, ?) }";
                odbcCommand.CommandType = CommandType.StoredProcedure;
    
                odbcCommand.Parameters.Add("p1", OdbcType.Decimal).Value = 42;
                var p2 = odbcCommand.Parameters.Add("p2", OdbcType.VarChar, 30);
                p2.Direction = ParameterDirection.InputOutput;
                p2.Value = "25";
    
                odbcConn.Open();
                odbcCommand.ExecuteNonQuery();
    
                return p2.Value as string; // returns 67
            }
        }
    }
    

    When using OUT or IN OUT parameters, the Size property of the OdbcParameter must be set to an adequate value.

    In response to your comment regarding exception handling, I would have the caller of the data access method handle exceptions. With the using construct, the Dispose method will be called automatically on the command and connection objects whether there is an exception or not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Case One: new Date(Date.parse(Jul 8, 2005)); Output: Fri Jul 08 2005 00:00:00 GMT-0700 (PST)
Sorry, I am pretty much an SQL noob. This has to work in MSFT
//case 1:post to main thread's handler mHandler.post(new Runnable(){ public void run(){ dosomething(); //update UI
The case : should select object example: function getDomPart(text,htmlTag){ return $(text).closest(htmlTag).get(0); } var text1='<object>some
Case: I receive a JSON string from third-party server, containing a list of objects.
Case 1: BufferedReader br = new BufferedReader( new InputStreamReader( new FileInputStream(file) ) ); br.close();
CASE WHEN system_type__c IS NOT NULL THEN 'Please setup a new system [' +
In case SQL Azure node fails, how does it work? Do I lose any
case i of 0..99 : Function-call('bobo') ; 100..209 : function-smell('Hobo'); 210..300 : function-yikes('argh'); end;
CASE: i load the user object in @PostConstruct , and when trying to get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.