CachedRowSet « JDBC « Java Database Q&A





1. problem using CachedRowSet for scrolling    coderanch.com

sad thing that rowset is available from jdk1.4 onward so your compiler can't find it as you are using jdk1.3. moreover, i am sure that ms-access hasn't have given any thin driver which supports rowset. anyway, a work around (which is really not a very good thing but i think its ok till we get jdk1.4 final version). just download latest ...

2. CachedRowSet: Can't find it    coderanch.com

No, it doesn't. However, I searched through all of the jar files that come with 1.4, and I could not find cachedrowset in any of the packages. So as far as I can tell, it does not come with 1.4. However, does anyone know if cachedrowset is supported by sun? Or have they written that class off? It's hard to find ...

3. CachedRowSet is an abstract class    coderanch.com

4. CachedRowset - Relaiable to use??    coderanch.com

5. CachedRowSet problem    coderanch.com

6. CachedRowSet updateRow() question    coderanch.com

7. CachedRowSet implementation    coderanch.com

You shouldn't use those classes since they are for JVM internal use only, and may be changed or removed from one Java version to another. That means that code that's working right now may not work anymore when you update your Java installation. This is true for all classes in packages that start with sun, sunw or com.sun.

8. CachedRowSet - still early access?    coderanch.com

9. Insalling CachedRowSet    coderanch.com





10. CachedRowSet    coderanch.com

11. CachedRowSet    coderanch.com

12. Getting ClassCastExceptions with CachedRowSet    coderanch.com

Pradeep, I do not think it's the Oracle database or driver, since I'm having the same problems. I myself am running j2sdk1.4.1_02, with the oracle thin driver, and accessing an Oracle database and all is working fine. However, my teammates are using the same database, and same oracle driver -- yet they are getting ClassCastException on CachedRowSet. They are running j2sdk1.4.2. ...

13. daRk side of CachedRowSet    coderanch.com

Hello All, I've been to many boards which address questions regarding CachedRowSet, yet I've found descriptions to be sparse and incomplete. Is there anyone here who has experience with this class, and if so, can you please expound on the following issues: 1.) why is this not part of the current j2sdk? 2.) is this compatible with all versions of j2sdk? ...

14. CachedRowSet    coderanch.com

15. CachedRowSet    coderanch.com

16. Poppulating CachedRowSet    coderanch.com





17. CachedRowSet    coderanch.com

FormattedDataSet fds=FormattedDataSet.createInstance(); // A thin wrapper for an Object[][] array. Note I handle all jdbc calls! ResultSetConverter rsc=fds.getResultSetConverter("select * from table"); // Or you can do the following if you want to handle jdbc calls (pass in a ResultSet) rsc=new ResultSetConverter(resultSet); // You could get out the Object[][] very easily Object [][] myData=rsc.getResultSet(); // Note the biggest advantage of using the ...

18. Problem with CachedRowset    coderanch.com

19. Problem with CachedRowSet    coderanch.com

20. CachedRowSet - Can't get an instance    coderanch.com

21. CachedRowSet    coderanch.com

I'm using a cachedrowset to store data from the database... I wanted to sort the data in the cachedrowset by a particular field. Say I have queried the data resulting to 10 columns and eventually stored in a cachedrowset. I wanted to sort it for example by column 1 or column 3 or any column without reconnecting again to the database. ...

22. CachedRowSet    coderanch.com

Hello, I copied the example for CachedRowSet from Sun and I have a problem that I solved but now I want to know why I have to do this. With the original I only get the first 10 objects and than java.sql.SQLException: Invalid Cursor position. Original: crs.setCommand("SELECT * from DB.table"); crs.setPageSize(10); crs.execute(con); while (crs.next()) { System.out.println(crs.getString("Name") + " " + crs.getString("Address")); ...

25. CachedRowSet    coderanch.com

Did you try google ? Disadvantage 1. As all the table rows are taken into memory, care should be taken with the query which retrieves the number of rows, as it will be very resourceful if huge set of rows is taken and the application will get very slow. 2. As rowsets will keep a connection to itself , hence the ...

26. Regarding CachedRowSet    coderanch.com

27. JDBC CachedRowSet scrolling?    coderanch.com

28. CachedRowSet    coderanch.com

29. Help using CachedRowSet    coderanch.com

I am making a todo list for my java class and even the teacher can not help me so I though I would turn to the experts. I am using a cachedRowSet to make an array list to add my todo items. They include taskID(the primary key & auto increment), taskDesc(The todo text), DueDate(sql date format), & completed(boolean). I can get ...

30. CachedRowSet.acceptChanges();    coderanch.com

31. reading cachedRowSet    coderanch.com

32. Populating the cachedRowSet    coderanch.com

I am facing the following problem. I execute a query, which is large and complex, it takes a 4 to 5 seconds to execute and returns around 20 rows. But while populating the cachedrowset, takes more than the time it takes to execute the query. The database is Oracle 9i. getConnection(); preparedStatement = connection.prepareStatement("My very complex query joining 14 tables"); //The ...

33. Implementing CachedRowSet    coderanch.com

34. Using populate in CachedRowSet    coderanch.com

Hi, In my application, i am reading the data from the database and then displaying it in another JSP. Pgm 1: DBPool.executeQuery(sqlQuery.toString(),DSN,loRS); if(loRS.next()){ loginVO.setCount(2); loginVO.setFirstname(loRS.getString("first_name")); loginVO.setLastname(loRS.getString("last_name")); loginVO.setPhone(loRS.getInt("phone")); } else { System.out.println("nothing retunred in loRS")} In program 1, i am calling the executeQuery method, which is getting the connection object and then exectuing the query. Program 2 shows how the executeQuery method ...

35. Retrieving data from cachedRowSet    coderanch.com

Hi, I am using somehting like this, loRS.getString("employee_no") to fetch the value from the Resultset object. Employee_no is the column name in the table. I am trying to find the maximum value in a column by using the query select max(marks) from employee.Now i tried using the int max_marks=loRS.getInt(1); But i am getting java.sql.SQLException: Invalid cursor position exception. Please tell me ...

36. CachedRowSet Warning    coderanch.com

37. How to use CachedRowSet in jdk 1.4?    coderanch.com

38. Fetching Records from CachedRowSet based on pagenum?    coderanch.com

Hi All, I need to display the records 15 per page and the pages are max 3000. So i need to use prev and next concept.But how to pass the the page num values to the cachedrowset object? Everytime its displaying all the records available in the resultset. crs.populate(rs); crs.setPageSize(20); crs.setMaxRows(15); Thanks Amarshi

39. How to implement createShared() method of CachedRowSet?    coderanch.com

Hi All, I need to create a copy of the existing cachedrowset object for pagination. I have a link which on click will display a page with 16 records and at the bottom there will next,prev button for pagination. So on 1st click of the link I am: 1. passing the pageNo as 0 2. fetching all the records from the ...

40. cachedrowset acceptchanges() NOT working    coderanch.com

i wrote this code so that "cachedrowset -- crs" (i got from the "resultset -- rs") can be changed according to the condn specified and the modified cachedrowset will be updated in the oracle database. condn. is when " name=sanjiv" it will change it to "rajiv" both in cachedrowset and database , it is changed in the cachedrowset (according to output ...

41. CachedRowSet not populating?    coderanch.com

So I'm trying to switch from using a normal ResultSet to a CachedRowSet so i can disconnect. My queries executed before i switched from RS to CRS my current code is: public static CachedRowSet DBQuery(String SQL){ CachedRowSet crs = null; Connection conn = null; ResultSet resultSet = null; try{ Class.forName("com.mysql.jdbc.Driver").newInstance(); conn = DriverManager.getConnection(DBPath,DBUsername,DBPassword); PreparedStatement preparedStatement = conn.prepareStatement(SQL); resultSet = preparedStatement.executeQuery(); crs ...

42. Writing to database from CachedRowSet    forums.oracle.com

In my java program, I have one CachedRowSet (crs1) that I've read a result set into from a database table. I've created a second CachedRowSet (crs2) that I have inserted the data from above crs1 into and included additional columns that will be updated from more database tables later. I've checked to be sure that this data is in fact in ...