ORA -2108

Hi Experts,

I am trying to get SEQ_table.nextval in a Net Express 4.0 COBOL program, which uses Oracle 10 Pro COBOL pre-compiler. I am getting ORA-2108 without any description of the error. Have any one got the similar kind of problem before. I need help in this matter since nobody seems to know whats wrong with SQL...

Below is my SQL:

I am using a working storage varaible: to store the following SQL:

WS-SQL = 'SELECT SEQ_TABLE.nextval
                    into :WS-RSLT-VALUE from DUAL '

EXEC SQL
        EXECUTE IMMEDIATE : WS-SQL
END-EXEC

Thanks,
Baluch.
 
baluchAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ZopiloteCommented:
ORA-02108: PCC: invalid descriptor passed to run-time library
Cause: This internal error typically indicates a memory-related error.
Action: Check the program for memory-related errors, such as invalid pointers or array-bounds violations.

Did you try directly?

EXEC SQL
        EXECUTE IMMEDIATE  'SELECT SEQ_TABLE.nextval into :WS-RSLT-VALUE from DUAL '
END-EXEC

Z;D
0
anand_2000vCommented:
In Pro-Cobol I think you have to use
EXEC SQL
        EXECUTE IMMEDIATE :WS-SQL  USING :WS-RSLT-VALUE
END-EXEC
0
baluchAuthor Commented:
Instead of EXECUTE IMMEDIATE, I change the SELECT SQL into a PREPARE statement and that did the trick.
Thanks,
Baluch.
0
anand_2000vCommented:
I have requested for a PAQ....The answer was obtained by the asker and I do not want points for this.
http://www.experts-exchange.com/Community_Support/Q_21213037.html
0
CetusMODCommented:
baluch, a request was made to refund your points and PAQ this question.

Question PAQ'd
125 points refunded.

CetusMOD
Community Support Moderator
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.