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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:29:50+00:00 2026-05-11T03:29:50+00:00

I’m trying to return sequence.nextval to my program from a proc stored in a

  • 0

I’m trying to return sequence.nextval to my program from a proc stored in a package. I’m pretty green when it comes to PL/SQL and I’m kind of at a loss as to what is happening. The error that is actually being return is

PLS-00306: Wrong number or types of arguments in call to PROCGET_BOOKMARKID line 1, column 7 statement ignored.

Here is my package creation code…

 create or replace package BOOKMARKS AUTHID DEFINER is   type t_Bookmark is ref cursor;    procedure procGet_Bookmarked_Information(bookmarkId in NUMBER, bookmark out t_Bookmark);   procedure procInsert_Bookmark(bookmarkId in NUMBER, currExtent in VARCHAR2, selectedLayers in VARCHAR2);   procedure procGet_Bookmark_Id(bookmarkId out NUMBER);  end BOOKMARKS;  

And the proc for get_bookmark_id looks like this (the other procs work fine so I’m not going to post them)…

   procedure procGet_Bookmark_Id(bookmarkId out NUMBER)   IS   BEGIN     SELECT seq_bookmarks.nextval INTO bookmarkId       FROM dual;    END procGet_Bookmark_Id; 

Now, I’m sure it’s not my sequence. I can get the nextval if I just query the db directly from my code by doing this…

 string sql = string.Format(@'select {0}.seq_bookmarks.nextval from dual', ApplicationSchema); 

Where application schema is just the db I'm connecting to in this case.

So, it appears to me that the problem is completely in my PL/SQL and that would make sense because I've hardly used it. Any ideas?

EDIT Ok, so here is the code that is actually making the call.

 DataOperationResult result = DataAccess.GetBookmarkId(); DataRow currResult = result.DataTableResult.Rows[0]; 

Where DataAccess is a class of just queries and the following is the code there for this specific query.

 string sql = string.Format('{0}.bookmarks.procGet_Bookmark_Id', ApplicationSchema); DataOperation operation = new DataOperation(DataOperationType.ExecuteScalar, ConnectionString, System.Data.CommandType.StoredProcedure, sql); return operation.PerformOperation(); 

Application Schema is just the database we want to query. ExecuteScalar is kind of long-winded and it's code I've not written that should be assumed to work (keyword being assumed). Hopefully this is enough to get an idea of what's happening though.

  • 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. 2026-05-11T03:29:51+00:00Added an answer on May 11, 2026 at 3:29 am

    I’ve just compiled your package, in PL/SQL Developer it works fine.

    The problem seems to be with the datatypes in your C# code.

    From what I see in description, you don’t bind any parameters. You should bind parameters somewhere in your code, like

    OracleParameter bid = new OracleParameter('bookmarkID', OracleDbType.Number); bid.Direction = ParameterDirection.Output; command.Parameters.Add(bid); 

    If there are lots of abstractions you need to deal with, you may redefine you procedure as a function:

    FUNCTION procGet_Bookmark_Id RETURN INTEGER IS   res INTEGER; BEGIN   SELECT seq_bookmarks.nextval   INTO res   FROM dual;   RETURN res; END procGet_Bookmark_Id; 

    and call it in a SELECT query:

    SELECT bookmarks.procGet_Bookmark_id FROM dual; 

    , which you seem to be able to do.

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

Sidebar

Ask A Question

Stats

  • Questions 97k
  • Answers 97k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Not possible - JS properties are not "executable" like C#… May 11, 2026 at 7:24 pm
  • Editorial Team
    Editorial Team added an answer The problem here is that the loaded swf looses it's… May 11, 2026 at 7:24 pm
  • Editorial Team
    Editorial Team added an answer In C++ you need the following: typedef double (*func)(char*); func… May 11, 2026 at 7:24 pm

Related Questions

I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I am currently running into a problem where an element is coming back from
Seemingly simple, but I cannot find anything relevant on the web. What is the
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.