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 7656027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:39:54+00:00 2026-05-31T12:39:54+00:00

I’m getting this err msg: System.ArgumentException was unhandled Message=Value with type Devart.Data.Oracle.OracleParameter not supported.

  • 0

I’m getting this err msg:

System.ArgumentException was unhandled
Message=Value with type Devart.Data.Oracle.OracleParameter not supported.

…with this code:

    OracleParameter pRes = new OracleParameter("C_REF", OracleDbType.Cursor);
    pRes.Direction = ParameterDirection.ReturnValue;

    oracleCommand1.Parameters.Clear();
    int iFromYear = dateTimePickerFrom.Value.Year;
    int iFromMonth = dateTimePickerFrom.Value.Month;
    int iFromDay = dateTimePickerFrom.Value.Day;
    int iToYear = dateTimePickerTo.Value.Year;
    int iToMonth = dateTimePickerTo.Value.Month;
    int iToDay = dateTimePickerTo.Value.Day;
    oracleCommand1.Parameters.Add("iStartDate", new DateTime(iFromYear, iFromMonth, iFromDay));
    oracleCommand1.Parameters.Add("iEndDate", new DateTime(iToYear, iToMonth, iToDay));
    oracleCommand1.Parameters.Add("iCATEGORYID", 114);
    oracleCommand1.Parameters.Add("c_ref", pRes);
    oracleConnection1.Open();
    oracleCommand1.ExecuteCursor(); 

Updated in response to the comment:

So what could be used in place of OracleParameter to pass?

When I change it to this (I’m just flailing around like a harried chicken):

    oracleConnection1.Open();
    OracleDataReader myReader = oracleCommand1.ExecuteReader();
    OracleParameter pRes = new OracleParameter("C_REF", myReader);
    pRes.Direction = ParameterDirection.InputOutput; // <-- devArt's code

    oracleCommand1.Parameters.Clear();
    int iFromYear = dateTimePickerFrom.Value.Year;
    int iFromMonth = dateTimePickerFrom.Value.Month;
    int iFromDay = dateTimePickerFrom.Value.Day;
    int iToYear = dateTimePickerTo.Value.Year;
    int iToMonth = dateTimePickerTo.Value.Month;
    int iToDay = dateTimePickerTo.Value.Day;
    oracleCommand1.Parameters.Add("iStartDate", new DateTime(iFromYear, iFromMonth, iFromDay));
    oracleCommand1.Parameters.Add("iEndDate", new DateTime(iToYear, iToMonth, iToDay));
    oracleCommand1.Parameters.Add("iCATEGORYID", 114);
    oracleCommand1.Parameters.Add("c_ref", pRes);
    while (myReader.Read())
    {
        ;// Console.WriteLine(myReader.GetInt32(0) + ", " + myReader.GetString(myReader.GetOrdinal("DName")));
    }
    // always call Close when done reading. 
    myReader.Close();

…I get nor err msgs, but I also get no data.

Update to the update:

OK, I finally got it working. These may not be elegant, but it does retreive data:

    oracleCommand1.Parameters.Clear();
    int iFromYear = dateTimePickerFrom.Value.Year;
    int iFromMonth = dateTimePickerFrom.Value.Month;
    int iFromDay = dateTimePickerFrom.Value.Day;
    int iToYear = dateTimePickerTo.Value.Year;
    int iToMonth = dateTimePickerTo.Value.Month;
    int iToDay = dateTimePickerTo.Value.Day;
    oracleCommand1.Parameters.Add("iStartDate", new DateTime(iFromYear, iFromMonth, iFromDay));
    oracleCommand1.Parameters.Add("iEndDate", new DateTime(iToYear, iToMonth, iToDay));
    oracleCommand1.Parameters.Add("iCATEGORYID", 114);

    oracleConnection1.Open();
    OracleDataReader myReader = oracleCommand1.ExecuteReader();
    OracleParameter pRes = new OracleParameter("C_REF", myReader);
    pRes.Direction = ParameterDirection.InputOutput;

    oracleCommand1.Parameters.Add("c_ref", pRes);

    while (myReader.Read())
    {
        MessageBox.Show(myReader.GetString(0)); // + ", " + myReader.GetString(myReader.GetOrdinal("contactemail")));
    }
    myReader.Close();

Now, though: how can I retrieve all of the data, rather than just from one columns, as I’m doing above? The best case scenario would be to direct the result set to a DataGridView, but if I have to I can concat (stringFormat()) the various columns I want and programmatically add them to a Memo or some such…

  • 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-31T12:39:55+00:00Added an answer on May 31, 2026 at 12:39 pm

    Looks to me like this page says the OracleDBType.Cursor type can’t be used here:

    An Oracle REF CURSOR. This type does not have corresponding .NET Framework type. The OracleDataReader object can be used to retrieve cursor content.

    Unless, of course I’m misunderstanding the documentation, which is entirely possible given I don’t do C#/DevArt.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
Does anyone know how can I replace this 2 symbol below from the string
I want to construct a data frame in an Rcpp function, but when I

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.