Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Help: ORA-1001

RE: Help: ORA-1001

From: Toepke, Kevin M <ktoepke_at_cms.cendant.com>
Date: Wed, 9 Aug 2000 07:04:25 -0400
Message-Id: <10584.114159@fatcity.com>


Usually when developers run into this its because they are referencing a cursor that hasn't been opened or has been closed.

Just this week, a developer came to me with the same question. His code looked like:

	OPEN  c_cursor;
	FETCH c_cursor INTO v_variable;
	CLOSE c_cursor;

	IF (c_cursor%NOTFOUND) THEN
	    handle_error_proc();
	    RAISE e_some_exception;
	END IF;

The problem being the "c_cursor" is already closed when referenced in the c_cursor%NOTFOUND line -- causing the ORA-01001 error.

The problem is probably in the source code.

Kevin

> -----Original Message-----
> From: yong huang [mailto:yong321_at_yahoo.com]
> Sent: Wednesday, August 09, 2000 1:25 AM
> To: Multiple recipients of list ORACLE-L
> Subject: Help: ORA-1001
>
>
> My coworker runs a program against our Oracle 8.1.5 on
> Solaris 2.6. It always
> throws the ORA-1001 error. But it doesn't abort the execution
> of the rest of
> the program. The description of ORA-1001 is:
>
> ORA-01001: invalid cursor
> Cause: Either a host language program call specified an
> invalid cursor or the
> values of the AREASIZE and MAXOPENCURSORS options in the
> precompiler command
> were too small. All cursors must be opened using the OOPEN
> call before being
> referenced in any of the following calls: SQL, DESCRIBE,
> NAME, DEFINE, BIND,
> EXEC,
> FETCH, and CLOSE. The Logon Data Area (LDA) must be defined
> by using OLON or
> OLOGON. If the LDA is not defined, this message is issued for
> the following
> calls: OPEN, COM, CON, ROL, and LOGOFF.
> Action: Check the erroneous call statement. Specify a correct
> LDA area or
> open the cursor as required. If there is no problem with the
> cursor, it may be
> necessary to increase the AREASIZE and MAXOPENCURSORS options before
> precompiling.
>
> Since it's not easy (but maybe possible) to get the source
> code, I want to know
> if I can do anything to help. Are AREASIZE referred to in the
> above description
> sort_area_size and MAXOPENCURSORS open_cursors initialization
> parameters? I
> have no experience in OCI or Pro*C. Thanks for any advice.
>
> Yong Huang
> yong321_at_yahoo.com
>
> __________________________________________________
> Do You Yahoo!?
> Kick off your party with Yahoo! Invites.
> http://invites.yahoo.com/
> --
> Author: yong huang
> INET: yong321_at_yahoo.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
Received on Wed Aug 09 2000 - 06:04:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US