how to move the resultset backward with sql as the backend can previous method be used if so how? give me an example please
4 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   vasanth_ramanathan
Posted On:   Sunday, January 5, 2003 01:22 AM

i use java as my frontend and sql as my backend with the help of jdbc-odbc connectivity i always get an exception resultset type is type forward only what i would like to know is how to move the resultset backward after fetching the data at the backend can the resultset be reversed before fetching the data is it the same way as the next is used res.next() can res.previous() be used then tell me how can it be established please give me an example does it carrys any constructors reply me back as soon as possible bye rm vasanth rm_vasanth@yahoo.com    More>>

i use java as my frontend
and sql as my backend with the help of jdbc-odbc connectivity

i always get an exception
resultset type is type forward only

what i would like to know is

how to move the resultset backward after fetching the data at the backend

can the resultset be reversed before fetching the data

is it the same way as the next is used
res.next()
can res.previous() be used
then tell me how can it be established
please give me an example

does it carrys any constructors

reply me back as soon as possible

bye
rm vasanth

rm_vasanth@yahoo.com

   <<Less

Re: how to move the resultset backward with sql as the backend can previous method be used if so how? give me an example please

Posted By:   Anonymous  
Posted On:   Saturday, January 11, 2003 09:03 AM

Another possibility is that your database does not support scrolling in the recordset (e.g. MS Access V2000).

John S.

Aylmer, PQ

Re: how to move the resultset backward with sql as the backend can previous method be used if so how? give me an example please

Posted By:   Janaki_Venkatesh  
Posted On:   Wednesday, January 8, 2003 08:09 AM

Visit this url
http://java.sun.com/docs/books/tutorial/jdbc/jdbc2dot0/cursor.html

I think this will help you in solving your problem.

jan.

Re: how to move the resultset backward with sql as the backend can previous method be used if so how? give me an example please

Posted By:   Janaki_Venkatesh  
Posted On:   Wednesday, January 8, 2003 08:09 AM

Visit this url
http://java.sun.com/docs/books/tutorial/jdbc/jdbc2dot0/cursor.html

I think this will help you in solving your problem.

jan.

Re: how to move the resultset backward with sql as the backend can previous method be used if so how? give me an example please

Posted By:   Christopher_Schultz  
Posted On:   Monday, January 6, 2003 11:22 AM

As I understand, the JDBC->ODBC bridge is not well supported by ODBC. Either ODBC cannot provide this function, or will not for the JDBC driver. In either case, I think you'll need to use a db-specific JDBC driver (type III or IV), which might require you to switch RDBMS vendors.



Otherwise, you'll have to find a solution that does not use scrollable result sets.



If you can't switch databases and require scrollability, there is an implementation of a scrollable result set on Sun's site which I (unfortunately) can't find right now.



If you were really desperate, you could simply read-in all the results into a List and do your own scrolling.



Good luck,

-chris
About | Sitemap | Contact