Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


Search this Thread
Old 04-19-2013, 01:35 AM   #1
LQ Newbie
Registered: Nov 2012
Posts: 27

Rep: Reputation: Disabled
How to pass Resultset rs object as parameter to Thread

Hello Everyone,

I am new to Java thread.I am not getting how to pass Resultset object which contain all records in it.

So that each thread should take each record and do the other processing.

The program is:

public class dataimport

public dataimport()
connect();//this function will connect to database and execute query
private void connect()
/* Connect database
str="SELECT * FROM tablename";

while (
/* here each record will pass to each thread */


Please can any one help me one this .

thank you in advance
Old 04-20-2013, 09:57 AM   #2
Senior Member
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,771

Rep: Reputation: 1272Reputation: 1272Reputation: 1272Reputation: 1272Reputation: 1272Reputation: 1272Reputation: 1272Reputation: 1272Reputation: 1272
you can find a lot of tutorials about threads on the net, here is a link about parameter passing:


java, thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How can i pass an entire Array into a function parameter by value? (no pointer pass) esgol Programming 26 07-31-2012 11:34 AM
How to pass a Kernel Parameter? brian.wright Linux - Newbie 3 02-24-2009 04:03 PM
how to change and pass thread parameter back to main dragondad Programming 3 09-19-2005 01:58 PM
how do I pass a module parameter? maerong Debian 2 02-07-2005 07:33 AM
send parameter from thread to thread marek Programming 2 09-08-2003 05:33 AM

All times are GMT -5. The time now is 11:58 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration