Problem on opening a cursor
I created a database and it is transactional.
So after closing it, I tryed to open it again to search for something. So a cursor is necessary. I opened the cursor with:
Cursor cursor = database.openCursor(null, null);
Ok the cursor is not null, but when I do something simple like:
System.out.println(cursor.count()); it throws the following exception:
java.lang.IllegalStateException: Cursor not initialized.
Is there any stuff I should do before doing cursor operations?
Please note this information from the javadoc for Cursor.count() that you must call Cursor.getXXX to position the cursor on a record before calling count:
Throws:
IllegalStateException - if the cursor or database has been closed, or the cursor is uninitialized (not positioned on a record), or the non-transactional cursor was created in a different thread.
Similar Messages
-
Problem in opening a ref cursor.
Hi,
I'm getting the following error when i'm trying to open the ref cursor. PL/SQL: ORA-22905: cannot access rows from a non-nested table item
What i'm trying to do is I'm dumping the data into pl/sql table and i want retrieving the by using a ref cursor. Please see the code and help me out.
CREATE OR REPLACE PACKAGE CPS_RECR.pg_pool_status AS
TYPE pool_rec IS RECORD (
status varchar2(50)
,stsno number
,stscode varchar2(5)
,candidatename varchar2(200)
,monyear varchar2(10)
,yyyymm number
,stscnt number
--type rec_sts_tab is table of number ;--index by pls_integer;
type pool_tab IS table of pool_rec index by binary_integer;
type pool_cv is REF CURSOR return pool_rec;
FUNCTION pool_status_query(p_start_date in date,p_end_date in date,p_invitedtopoolbit in number,p_showedForPoolBit in number)
RETURN pool_tab;--pool_cv ;
cursor cur_pool(p_start_date date,p_end_date date,p_invitedtopoolbit number,p_showedForPoolBit number)
is
SELECT distinct to_char(date1,'yyyymm')yearmonth
FROM acs100data a,
acs100_candidate_verification b,
acs100_candidate_pool d
WHERE UPPER (a.basic_email) = UPPER (b.email)
AND (b.candidate_status IN ('FORL', 'FWRT') or BITAND (b.candidate_status_bit, 4 ) > 0
or BITAND (b.candidate_status_bit, 2) > 0)
AND d.pool_id = b.pool_id
AND pool_date BETWEEN p_start_date AND p_end_date
AND is_tentative_date IS NULL ;
cursor cur_name(p_yyyymm varchar2,p_cond number,p_start_date date,p_end_date date)
is
select *
from (select distinct (case
when p_cond = 0 and b.candidate_status = 'FORL'
then (last_name || first_name)
when p_cond = 1 and b.candidate_status = 'FWRT'
then (last_name || first_name)
when p_cond = 2
and bitand (b.candidate_status_bit, p_cond) > 0
then (last_name || first_name)
when p_cond = 4
and bitand (b.candidate_status_bit, p_cond) > 0
then (last_name || first_name)
end
) candidatename
from acs100data a,
acs100_candidate_verification b,
acs100_candidate_pool d
where upper (a.basic_email) = upper (b.email)
and d.pool_id = b.pool_id
and pool_date between p_start_date and p_end_date
and to_char (date1, 'yyyymm') = p_yyyymm
and is_tentative_date is null)
where candidatename is not null;
END pg_pool_status;
CREATE OR REPLACE PACKAGE BODY CPS_RECR.pg_pool_status
AS
FUNCTION pool_status_query (
p_start_date IN DATE,
p_end_date IN DATE,
p_invitedtopoolbit IN NUMBER,
p_showedforpoolbit IN NUMBER
RETURN pool_tab--pool_cv
IS
tab_pool pool_tab;
temp_rf pool_cv;
n_index NUMBER := 1;
--rec_sts_data rec_sts_tab;
n_stscnt NUMBER;
vc_status VARCHAR2 (100);
vc_label varchar2(1000);
vc_name varchar2(100);
BEGIN
tab_pool.DELETE;
vc_label :='Opening Pool cursor';
FOR rec_pool IN cur_pool (p_start_date,
p_end_date,
p_invitedtopoolbit,
p_showedforpoolbit
LOOP
if cur_pool%notfound then
exit;
end if;
vc_label :='Opening p_cond cursor';
FOR p_cond IN 0 .. 3
LOOP
n_stscnt := 0;
vc_status := NULL;
begin
SELECT SUM
(NVL
(COUNT
(CASE
WHEN p_cond = 0
AND b.candidate_status = 'FORL'
THEN (last_name || first_name)
WHEN p_cond = 1
AND b.candidate_status = 'FWRT'
THEN (last_name || first_name)
WHEN p_cond = 2
AND BITAND (b.candidate_status_bit,
p_cond) > 0
THEN (last_name || first_name)
WHEN p_cond = 4
AND BITAND (b.candidate_status_bit,
p_cond) > 0
THEN (last_name || first_name)
END
0
) cnt,
DECODE (p_cond,
0, 'FAILED WRITTEN TEST',
1, 'FAILED **** TEST',
2, 'Invited for Pool',
4, 'Showed up for Pool'
) status
INTO n_stscnt,
vc_status
FROM acs100data a,
acs100_candidate_verification b,
acs100_candidate_pool d
WHERE UPPER (a.basic_email) = UPPER (b.email)
AND d.pool_id = b.pool_id
AND pool_date BETWEEN p_start_date AND p_end_date
AND TO_CHAR (date1, 'yyyymm') = rec_pool.yearmonth
AND is_tentative_date IS NULL
GROUP BY candidate_status,
b.candidate_status_bit,
DECODE (p_cond,
0, 'FAILED WRITTEN TEST',
1, 'FAILED **** TEST',
2, 'Invited for Pool',
4, 'Showed up for Pool'
exception
when no_data_found
then
n_stscnt :=0;
vc_status :=null;
end;
vc_label :='Opening name cursor';
FOR rec_name IN cur_name (rec_pool.yearmonth,
p_cond,
p_start_date,
p_end_date
LOOP
if cur_name%notfound then
exit;
end if;
tab_pool (n_index).yyyymm := rec_pool.yearmonth;
tab_pool (n_index).stscnt := n_stscnt;
tab_pool (n_index).status := vc_status;
tab_pool (n_index).candidatename := rec_name.candidatename;
dbms_output.put_line('tab_pool(n_index).yyyymm : '||tab_pool(n_index).yyyymm);
dbms_output.put_line('tab_pool(n_index).stscnt : '||tab_pool(n_index).stscnt);
dbms_output.put_line('tab_pool(n_index).status : '||tab_pool(n_index).status);
dbms_output.put_line('tab_pool(n_index).candidatename : '||tab_pool(n_index).candidatename);
vc_name :=rec_name.candidatename;
END LOOP;
n_index := n_index + 1;
END LOOP;
END LOOP;
RETURN tab_pool;
exception
when others
then
dbms_output.put_line('error :'||vc_label||'--'|| vc_name);
END;
END pg_pool_status;
---run script
DECLARE
RetVal CPS_RECR.PG_POOL_STATUS.pool_tab;
P_START_DATE DATE;
P_END_DATE DATE;
P_INVITEDTOPOOLBIT NUMBER;
P_SHOWEDFORPOOLBIT NUMBER;
temp_cv CPS_RECR.PG_POOL_STATUS.pool_cv;
BEGIN
P_START_DATE := to_date('09/01/2008','mm/dd/yyyy');
P_END_DATE := to_date('09/30/2008','mm/dd/yyyy');
P_INVITEDTOPOOLBIT := 2;
P_SHOWEDFORPOOLBIT := 4;
open temp_cv for select * from table((CPS_RECR.PG_POOL_STATUS.POOL_STATUS_QUERY ( P_START_DATE, P_END_DATE, P_INVITEDTOPOOLBIT, P_SHOWEDFORPOOLBIT )) );
end loop;
exception
when others
then
dbms_output.put_line(sqlerrm);
END;Satyaki,
It doesn't help me out. I'm worndering one of code sample is working fine. i didn't my current is giving the problem.
FYI, please see the some code i followed.
SQL> Create or replace PACKAGE cv IS
2 type comp_rec is RECORD
3 (deptno number,
4 ename varchar(10),
5 compensation number);
6 type comp_tbl IS table of comp_rec;
7 function get_coll return comp_tbl pipelined;
8 temp_tbl comp_tbl := comp_tbl();
9 type comp_cv is REF CURSOR return comp_rec;
10 end;
11 /
Package created.
SQL> Create or replace PACKAGE body cv IS
2 function get_coll return comp_tbl pipelined
3 is
4 begin
5 for i in 1..temp_tbl.count loop
6 pipe row(temp_tbl(i));
7 end loop;
8 return;
9 end;
10 end;
11 /
Package body created.
SQL> declare
2 temp_cv cv.comp_cv;
3 rc cv.comp_rec;
4 begin
5 cv.temp_tbl.delete;
6 cv.temp_tbl.extend;
7 cv.temp_tbl(1).deptno:=10;
8 cv.temp_tbl(1).ename:='1223';
9 cv.temp_tbl(1).compensation:=10;
10
11 -- erroring out
12 open temp_cv for select * from table(cv.get_coll);
13 fetch temp_cv into rc;
14 dbms_output.put_line('Deptno is ' || rc.deptno);
15 dbms_output.put_line('ename is ' || rc.ename);
16 end;
17 /
Deptno is 10
ename is 1223
PL/SQL procedure successfully completed. -
[Help] statement.executeQuery(query) opens MULTIPLE cursors
Hey everyone,
I'm having a real hard time finding anything about this on the net so I've turned here. When we call:
resultSet = statement.executeQuery(query)
from a servlet for some reason that one executeQuery opens anywhere from 9-12 cursors in our oracle DB. All the executeQuery documentation I could find just said it should open 1 cursor for that particular ResultSet. query is a fairly simple SQL statement, it searches multiple tables but that doesn't explain why it should open so many cursors.
On a side note the resultSet and statement are global to the method and are closed in the finally block, no SQLExceptions are thrown further adding to my confusion.
If anyone has seen something like this where executing 1 query opens multiple cursors please let me know any information you might have.
Thanks in advance
-DaveHi Dave
I had a similar problem using the Oracle 8i, but my query was a more complicated than yours and opened a lot of cursors.
The answer is to close every ResultSet and the Statement:
while (xxResult.next()){ ... }
xxResult.close();
xxResult.getStatement().close();
This worked for me,
Good luck,
Daniel. -
Problem while opening Bex query on the web
Hello BW experts,
I have a problem while opening Bex query from my SAP Favorites.See below.
When i double click on the query, i get the following page, with the server name KBWS01QX.
But, from RSRT Tcode, select the query > query display as HTML > Click on ABAP Web , click execute as shown below, it is going to the correct URL as in the 2nd screen shot below.
My question is why is it going to the wrong URL when i open it from SAP Favorites menu?
I want it to open the same URL as it opened from RSRT(which is the right one)
What is the Config needed to make it to work from SAP favorites.
Any help would be appreciated.
Thanks alot.
SVHello,
Thank you all for your responses.
See below some additional info.
From RSRT, this time I clicked on JAVA WEB, and i get the below URL, which is the same URL i was getting when i executed the query from SAP favorites.
http://kbws01qx.xxxxxxx.com:50000/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?QUERY=ZCONSUMPTION
Also, i have executed the Function module : RSBB_URL_PREFIX_GET and i get the below values.
It seems that it is trying to connect to Java portal something services may be, but i want it to open in ABAP web only.
Please help. -
how to solve the problem when opening program illustrator cs6
ERROR: 16
It is WINDOWS 8.1 / 64 BIT
help pleaseThanks, Jeff! The file Adobe Setup Error.log contains the following information:
02/14/14 07:20:26:474 | [INFO] | | OOBE | DE | | | | 8860 | DEVersion: 5.0.0.0
02/14/14 07:20:26:475 | [INFO] | | OOBE | DE | | | | 8860 | Loading library from C:\Program Files (x86)\Common Files\Adobe\OOBE\PDApp\DECore\DE5\Setup.dll
[ 8860] Fri Feb 14 07:20:26 2014 INFO
::START TIMER:: [Total Timer]
CHECK: Single instance running
CHECK : Credentials
Load Deployment File
CHECK : Another Native OS installer already running
Create Required Folders
Assuming uninstall mode
Lookup for master payload
[ 8860] Fri Feb 14 07:20:26 2014 ERROR
DW040: The product "{893B3B44-0A1E-404B-8FE8-0A74509102A9}" is not installed. Cannot proceed with the uninstall
[ 8860] Fri Feb 14 07:20:26 2014 INFO
:: END TIMER :: [Total Timer] took 6.90443 milliseconds (0.00690443 seconds) DTR = 579.338 KBPS (0.56576 MBPS)
-------------------------------------- Summary --------------------------------------
- 0 fatal error(s), 1 error(s), 0 warning(s)
ERROR: DW040: The product "{893B3B44-0A1E-404B-8FE8-0A74509102A9}" is not installed. Cannot proceed with the uninstall
Please search the above error/warning string(s) to find when the error occurred.
These errors resulted in installer Exit Code mentioned below.
Exit Code: 33 - The product is not installed, cannot uninstall.
Please see specific errors and warnings for troubleshooting. For example, ERROR: DW040 ... -
Hi all,
I need to create a workbook on a query, Am facing problem in opening the query, when i try to open a query in analyzer/ RSRT it starts processing & continues till 1 hour or more & finally message "Time limit Exceeded" pops up.
i tried opening a workbook & copy the workbook & tried changing the query in the data provider. but the same problem persists.
can anyone suggest me an alternate way to create workbook on a specified query.
Regards
jasmine.Hi arun,
It is not due to query performance coz all the performance related measure such as BIA & Aggregates are already taken, i dont even get the variable pop up screen for selecting &
once when i executed the query in RSRT it gave an ABAP Debugger errror. i check if it was problem with table space, but space is available & its auto extendable. -
Problem with opening of PDF in my webmail application
I have a problem with opening a pdf file in my webmail application of my internet provider in apple safari since yesterday. When I wanted to open up a pdf file I got a pop up message to allow a connection between adobe and the webmail application which I did. Since then I can not open up a pdf file. If I go to another browser or if I use email from another internet provider I use too it works and I can open up. It seems to be a blockage of the specific combination of this webmail application and safari.
What can I do ?Hi,
I have same requirement.
I need to cnvert smartform->pdf->send mail.
The mail is send but the attachment is corrupted.
Can you tell me what code you have written so its working in developement? -
Problem with opening a indd file in CC 2014.
When I'm trying to open a 5.5 .indd-file in CC 2014 on my Windows computer, I get this error message: 'Either the file does not exist or you do not have permission to open it or the file is used by another program'. However my collague has no problem with opening the document on his Mac computer. I guess it has something to do with a kind of setting in my CC 2014. Can anyone help me?
Nothing to do with ID. It really means what it says - your file permissions are hosed and it being an ID file this could include things like fonts or placed images referenced within it.
Mylenium -
Problem with opening some of PDFs in Photoshop CS6.
Hi, I have a problem with opening some of PDFs in Photoshop CS6. It is said: it isn't possible to carry out an order since the module of the file format cannot analyse this file
Don’t know if Reader has this, too, but in Acrobat one can check under Document Properties.
I can convert and place the file in Photoshop CS6.
I would recommend trying the usual trouble-shooting routines and if nothing helps un-installing, running the Cleaner and re-installing Photoshop. (After making sure all customized presets like Actions, Patterns, Brushes etc. have been saved to s secure location.)
http://blogs.adobe.com/crawlspace/2012/07/photoshop-basic-troubleshooting-steps-to-fix-mos t-issues.html
Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6 -
I have a problem to open my Number Program. this message appear when i try to open"The last time you opened Numbers, it unexpectedly quit while reopening windows. Do you want to try to reopen its windows again" then I tried to open it but nothing happened.... I would be thankful if you could help me..
Process: Numbers [1021]
Path: /Applications/Numbers.app/Contents/MacOS/Numbers
Identifier: com.apple.iWork.Numbers
Version: 3.0 (1470)
Date/Time: 2014-06-27 16:13:23.405 +0100
OS Version: Mac OS X 10.9.3 (13D65)
Report Version: 11
Anonymous UUID: 243D9264-54B7-E9AE-2F83-D11098965D14I have a problem to open my Number Program. this message appear when i try to open"The last time you opened Numbers, it unexpectedly quit while reopening windows. Do you want to try to reopen its windows again" then I tried to open it but nothing happened.... I would be thankful if you could help me..
Process: Numbers [1021]
Path: /Applications/Numbers.app/Contents/MacOS/Numbers
Identifier: com.apple.iWork.Numbers
Version: 3.0 (1470)
Date/Time: 2014-06-27 16:13:23.405 +0100
OS Version: Mac OS X 10.9.3 (13D65)
Report Version: 11
Anonymous UUID: 243D9264-54B7-E9AE-2F83-D11098965D14 -
F-32 : Problem with Open Item selection
Hi,
We have a strange problem with open Item selection for customer clearing in t-code F-32
In My QA system
if I input spl GL indicator ="*" and uncheck Normal OI tick,
the system selects all open items,
(those with spl GL indicator and those without spl GL indicator)
In My Dev system
If I input spl GL indicator ="*" and uncheck Normal OI tick
the system does not select any open items,
Please let me know which setting controls this behaviour ?
Regards
SachinHello,
Check your data in FBL5N for the option "Special GL Transactions". There could be that there is no data in the system with SPECIAL GL TRANSACTIONS.
In F-32, there is no value like *
You need to input right Special GL Indicator. "*" will not work here.
I am sure in both the systems if you put "*" and UNTICK your normal transaction, you will NOT get any items to clear.
Please DOUBLE CHECK whether you have unticked normal transaction.
Regards,
Ravi -
Problem with opening more then one file in Adobe Acrobat X Pro - nvd3dum.dll
Hello,
I have Adobe Arobat X Pro version: 10.0.1.434. Everything works great up to now. Last time I done upgrade my system to windows 7 64bit with SP1. When I open pdf file in adobe acrobat everything works great, but when I open second file, I receive this problem that Adobe acrobat stopped working and I receive this error : nvd3dum.dll. I have red somewhere that it will be due to driver to graphic card or DirectX. I upgraded them to a new but nothing, problem still remained.
Here is problem details:
Nazwa zdarzenia problemu: APPCRASH
Nazwa aplikacji: Acrobat.exe
Wersja aplikacji: 10.0.1.434
Sygnatura czasowa aplikacji: 4d457194
Nazwa modułu z błędem: nvd3dum.dll
Wersja modułu z błędem: 8.17.12.6658
Sygnatura czasowa modułu z błędem: 4d27c323
Kod wyjątku: c0000005
Przesunięcie wyjątku: 003814fb
Anybody tell me what must I do to disolve problem to open not only one but two, three .... and so on. Has anyone noticed the same problem at home?
Thank all for advice
marbross77Hello Dave
the Problem affects all Uniplot 3d Files. I start with an Excel or .txt file with 3 columns and uniplot creates an engine diagram similar to this one: http://www.uniplot.de/documents/de/_images/Uni_BSP7-2.png
Uniplot can Export this as a .u3d but it can not be opened with Adobe. Then I tried to open the .txt.file with MeshLab. I can see the correct Points (which Uniplot uses to create the engine diagram) but of course they are not connected. If i Export those Points in MeshLab as a .u3d file, Adobe can not work with it.
I do not know how to deal with this Problem. Do you have any suggestions?
Thanks in advance for your help -
Problem in opening layout editor in adobe forms
Hi,
There is a problem in opening the layout editor in adobe forms(T.code SFP).
Eventhough I have installed Adobe livecycle designer 8.0 and adobe acrobat reader 9.0.
It is showing the error as " The forms design tool for developing the form layout could not be started; either it is not installed or there are errors in the installation".
Suggest Me.
Moderator message: please have a look in the dedicated forum for Adobe forms.
Edited by: Thomas Zloch on Jan 15, 2011 9:49 PMHI Jaydeep,
Thanks for reporting the issue. Is it possible for you to share the pdf , it is possible that the document is corrupt. You may share the pdf at [email protected]
Thanks,
-vaibhav -
Problem to open a *.ppt document
Hi,
I got some problems to open a PowerPoint document in a content area where a file url was added.
The result is a SSO Error.
I can save on the disk the document and then I can read it, but I cannot open it directly from the web page. This problem does not appear in all cases. For certain computer, it works.
I find it very strange and bizarre.
If you got a solution and reason why it does not work, please help me.
Thank you in advance for your help.
Sincerely yours.hi farouk,
if this works on some machines and some others are causing problems this will most likely be a browser problem. could you compare the browsers (and versions) used on the different machines. maybe it helps to delete the browser cookies and delete the browser cache. if this does not help the exact error message would be helpful.
thanks,
christian -
Problem to open websides from the meny in a Ipad
I have made a website with dreamwaver CS 5,5 and everything
working just fine, but on a Ipad it is sometime problem to open
page from the drop meny? Is there anybody who can tell me
why it is so? is there any solution ?
Try it if you have access to Apple Ipad Air, http://www.ornskoldsvikshamn.se
Greatful for answers
MatsThe problem is the Spry Menu system that was included in your version of DW.
Spry is not good at handling touch displays since it requires a mouse to make the drop down menus appear and those devices do not have mice.
This is one of the reasons Adobe abandoned Spry back in 2012.
You would be better served using a different menu system, either jQuery or pure css. Do a search in Google for either and you will be given many, many options to choose from. If you aren't comfortable with the copy/paste and minor tweak coding from the how-to instructions, you can also obtain the Menu Magic extension for DW from Project VII that would allow you to use DW's design view interface to make the menus.
Maybe you are looking for
-
The heat vented from the back of the laptop caused the glue to fail and now the screen is separating from back of the lcd case near the hinges. I know for a fact that this issue is known by Apple as I have seen the issue reported at least a dozen tim
-
TS1398 I dont have any signal??? it was fine before
I don't have any signal and can't connect to wifi.
-
Is varchar2(9) or even number(9) bad as a ssn?
Hi All, I just want to question the wisdom of (<INT>) datatypes. If I do ... create table table_0123 ( ssn varchar2(9), ... in tons of tons code (or even in a small piece of code that gets used or modified over and over), won't I be setting my self u
-
-1 Minus One for Firefox not working
I recently switched back to Firefox from Chrome and tried to download the -1 extension for Google+ from [http://gminus.nolofone.com/en here]. However, while it worked fine on Chrome, it doesn't seem to be working on Firefox, and I can't figure out wh
-
SSD Optimization using Win7 Pro & PS CS5
Hey everyone, my question is for those of you out there using PS CS5 with Win7 Pro 64-bit with a SSD. In particular, I'm using an 30GB OCZ Vertex I. I've been using the two for nearly a year now. I got Win7 Pro to install at 15GB, leaving the rest