Cursor « Cursor « Java Database Q&A





1. Java JDBC ignores setFetchSize?    stackoverflow.com

I'm using the following code

 st = connection.createStatement(
            ResultSet.CONCUR_READ_ONLY,
   ResultSet.FETCH_FORWARD,
   ResultSet.TYPE_FORWARD_ONLY
    );
 st.setFetchSize(1000);
 ...

2. Berkeley DB JE - open cursor count    stackoverflow.com

Is there a way to ask the API for a list of open cursors (or at least a count of the number of currently open cursors) ?

3. Is there a way to find out a database cursor is open or not in Java?    stackoverflow.com

Is there a way in JDBC to find out the cursor opened or not in JAVA. We are getting an exception when tried to access an un opened cursor. java.sql.SQLException: Cursor is closed. Here ...

4. Java DB choose for better perfomance    stackoverflow.com

I have java application that process such kind of data:

class MyData
{
     Date date;
     double one;
     double two;
   ...

5. Traversing BerkleyDB database in store order    stackoverflow.com

When using cursors in BerkleyDB JE I found that traversing a dataset generate a lot of random read IO. It happens because BDB traverse dataset in primary key ascending order. In my ...

6. jython zxJDBC: How to get a dictionary from a cursor?    stackoverflow.com

I am using JDBC to connect my jython to a heterogeneous set of databases. Using a cursor I get the rows in list form, and the cursor also knows the metadata (cursor.description). Usually you ...

7. maximum open cursor ... please help    coderanch.com

Hi all, I'm facing a strange problem in my java application. I'm connecting to Oracle database using jdbcodbc driver. My application consists of swing GUI . It populates a number GUI elements like JList/Jcombo.... in a number of panels using the data retrieved from oracle db. It again uses the parameters selected by the user to generate various reports/graphs.(this again requires ...

8. About Cursor    coderanch.com

9. Rahul's Argument !! Function/Procedure retrun Cursor itself to a Java Program?!!    coderanch.com

Please see following example which I borrow now from one of my previous assignments: import java.sql.*; import java.io.*; import oracle.jdbc.driver.*; public class retrefcur_samp { public static void main (String args []) // throws SQLException { try { DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); connection URL. Connection conn = DriverManager.getConnection ("jdbcracle:thin:@pavilion03:1529ra8i", "you", "me"); init (conn); CallableStatement call = conn.prepareCall ("{ ? = call java_refcursor.job_listing (?)}"); call.registerOutParameter ...





10. Maximum cursors Exceeded????    coderanch.com

11. max open cursors again...    coderanch.com

hi I am having this problem of getting an error message max cursors open. i have a couple of doubts in this : 1. are database connection (java.sql.Connection class) they also called cursors. can this error come if i dont close my connections properly ?? 2. how many connections will be opened by following type of code ? can this be ...

12. Cursors and Weblogic JDriver    coderanch.com

13. HOW TO EXTRACT DATA FROM A CURSOR    coderanch.com

14. Invaild Cursor State    coderanch.com

15. Problems with functions and absolute cursor control.    coderanch.com

I am attempting to write a paginated results class, which will allow a web user to make paginated queries to the preparedCall and return a OracleTypes.CURSOR object. The user session would then store the current position and only retrieve results associated with the current page using the absolute function. This is basic stuff, I know, but I cant find out how ...

16. Cursor Already Open ?    coderanch.com

Hi! I have a java app that is in use by our users. For some reason, that I have not been able to figure out, every once in a while, they will get a java.sql.exception Cursor C1 Already Open error message. The first place it started happening was in Order Maintenance. They would key an order number, and if it was ...





17. index, cursors question    coderanch.com

Hello All, I would really appreciate if you could clarify these doubts on index, cursors by EOD. 1. What are different Types of Indexes: 2. What type of index by default is being for a primary key and unique key? 3. What are different types of cursors and explain them? Thank you Saritha

18. Max Open Cursor! Please Help.    coderanch.com

Hi ! I have a problem with MAX Open Cursors ! My requirement is like this, i need to query 50,000 odd records from one database and then query depending on primary key to the same table in another database. If the data exists in db2 then i need to update else i need to insert the record from db1 into ...

19. an illigal cursor status.    coderanch.com

20. invalid cursor type    coderanch.com

21. Handling Cursors in JDBC programming    coderanch.com

22. Storedprocedures returns cursor    coderanch.com

Hi Sunil Thanks for you response. But im using SQLServer ..i need to know how to solve this when using SQLServer. As im not able to find the Driver Documentation (Microsoft JDBC Driver for SQLServer).Please let me know where can i find the API for this driver. Please any one help me reg this issue.Its very urgent

23. pass a cursor between databases    coderanch.com

24. Explicitly Freeing Cursors in 10g?    coderanch.com

Got a weird question about an error our customer getting in an application we wrote when it is run against Oracle 10g. We had a Java Stored Procedure that was reading in a file and then dumping the data after parsing into Oracle 9i. The system in question has been updated to 10g and is suddenly giving us an error that ...

25. Bigger type length than Maximum with OracleType.CURSOR    coderanch.com

I'm getting one SQLException When I execute one query which try to open one oracle cursor. My jdk version is 1.4.2_08 and oracle version is 10g Enterprise Edition Release 10.1.0.4.0. And I use ojdbc14_g.jar and orai18n in CLASSPATH. My code and my table is very simple: CallableStatement cs = myConn.prepareCall( "begin open ? for select * from hello; end;" ); cs.registerOutParameter(1, ...

26. maximumm cursors exceeded    coderanch.com

While we did one implementation I would get this exception : scenario was we were reading line by line from a file and would insert records into the database The file could run into thousands of records . so for each line in file was inserting a record in the database suddenly in the middle of the run - it would ...

27. open cursors monitoring help required    coderanch.com

I am using resin2.1.x connection pooling and oracle9i, i want to know is it possible to remove a certain connection from the pool manually. Infact i will observer if a certain connection is using more than 100 cursors, then just remove that connection pool, and get some new. it will be use ful to prevent MAX OPEN CURSOR EXCEEDED, i am ...

28. Maximum cursor exceed    coderanch.com

Hi All - (Sorry Sachin - I don't mean to hijack your question, but I didn't want to post the same exact issue in another thread). I am having the same problem, and the solution below does not help. Nor does any other solution I can find... Here is my code - it happens after less than 100 record insertions. insapp ...

29. ORA 01001 : Invalid Cursor    coderanch.com

Hello there! I have a query that returns a large amount of data (please don't throw any rocks at me, I really have some reasons for this query although I do not agree with them). The query is very simple: SELECT email from USERS; single column, indexed on Oracle 10g. Problem is: 1.98 million results. Well, running this query using a ...

30. Open Cursors:New Issue    coderanch.com

Hi all Ranchers I m facing a very peculiar problem in my application We take connection object fro the connection pool Do the processings:: Open resultSet Fire queries But the resultset is kept open AND WE HAVE RETURNED THE CONNECTION TO THE POOL Now the problem is that it ius not possible for us to pit rs.close() Secondly there are Cursors ...

31. implicit open cursors problem    coderanch.com

Hello everyone, I am using Stored procedures heavily my application. What I could find out is that implicit cursors opened by stored procedures are kept open, even after we close the connection and statment. So whenever a procedure is called, the statments opened are left open in Session in Oracle. This is leading to SQLException because database is having a maximum ...

32. Question on Cursors    coderanch.com

Hi, This is an ORACLE SQL question, rather than a JDBC question. Suppose i have a table 'Table1' with the following records: Fund :Col2: SeqNo: Col4 ======================== 1 1 1 x 1 1 2 y 2 1 5 y 2 1 6 x 1 0 3 p 2 0 4 y The Query that would return this resultset in the order ...

33. what is real world uses of cursors?    coderanch.com

34. Cursor state not valid.    coderanch.com

Hello, I receive the following error : java.sql.SQLException: Cursor state not valid. here is my code : String sql_query = "INSERT INTO TABELA(CAMPO1, CAMPO2, CAMPO3) VALUES ( ? ? , ? )"; try { Class.forName(driver); Connection connection = DriverManager.getConnection(URL); PreparedStatement prepared_statement = connection.prepareStatement(sql_query); int i ; for(i = 0; i < 10; i++) { String u = (String)ptabela.getValueAt(i, 0); String uu ...

35. HF SQL - cursors    coderanch.com

37. SQL CURSOR    coderanch.com

38. How I can pass Cursor as In parameter    coderanch.com

Hello Everyone, I have a function which takes Cursor as IN Parameter... Please someone help me "How I can pass Cursor as In parameter"... Whether it will take Array as inparameter or any otherthing FUNCTION MSTFUPRF ( pi_acnt_id IN ACCOUNTS.ACNT_ID%TYPE, IN parameter of Number type, Pass ACNT_ID pi_ugrp_id IN USAGE_GROUPS.UGRP_ID%TYPE, IN parameter of Number type, pass UGRP_ID pi_uprf IN trc_uprf ...

39. ora-0100 maximum number of cursors exceeds    coderanch.com

statement5=connection.prepareStatement("insert into TRANSDETAIL(TRANSNO,ITEMCODE,SERIALNUMBER,MOBILENUMBER,INVOICENO) values(?,?,?,?,?)"); statement6=connection.prepareStatement("insert into CHANNELINVENTORY(ITEMCODE,SERIALNUMBER,MOBILENUMBER,CHANNELCODE,CURRENTSTATUS,LASTUPDATEON,CIRCLEID) values(?,?,?,?,?,sysdate,?)"); for(int i=0;i 0 && i % 1000 == 0){ statement5.executeBatch(); statement5.addBatch(); statement5.clearParameters(); }else{ statement5.addBatch(); statement5.clearParameters(); } // statement5.addBatch(); statement6.setString(1,primaryForm.getItemCode()); statement6.setString(2,primaryForm.getSerialNumber()); statement6.setString(3,primaryForm.getMsisdn()); statement6.setString(4,primaryForm.getDistributorCode()); statement6.setString(5,"UN"); statement6.setString(6,circleId); //statement6.executeUpdate(); if (i > 0 && i % 1000 == 0){ statement6.addBatch(); statement6.clearParameters(); statement6.executeBatch(); }else{ ...

40. JDBC Max number of cursors exceeded issue    coderanch.com

Hello, A few months back we faced an issue where in the stack trace we saw an exception specifying the maximumm number of cursors are exceeded I do understand why this exception is caused ( not closing prepared statement ) Have since rectified the issue. My query is - after we get the exception : 1 >At what point are the ...

42. cursor?    coderanch.com

This is a continued question for this thread thread I am trying to create a function not a procedure that returns cursor. I have tried this but get compiler errors FUNCTION results( a number ) return SYS_REFCURSOR as cursor mycursor return TESTTABLE%T1 is select * from TESTTABLE ; BEGIN open mycursor ; -- for select * from TESTTABLE ; return mycursor ...

43. Plsql cursor jdbc    java-forums.org

Good article, but it does (sort of) agree with what I said about it being not really doable (at least as an automated thing). I did, however, get my terminology wrong. I thought it was down to the cacheing, but it's simply down to Oracle not closing cursors straight away. I say automated, since they're talking about unit testing...and I would ...