File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and Relational Databases and the fly likes Request.getParameterValues related question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Request.getParameterValues related question" Watch "Request.getParameterValues related question" New topic
Author

Request.getParameterValues related question

Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 833


Thanks in anticipation
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9378
    
  20

Do you have any question?? The setString method doesn't take a String[]. That's why you are getting an error...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 833
Thanks for your prompt reply
Ankit Garg wrote:Do you have any question?? The setString method doesn't take a String[]. That's why you are getting an error...


This is my Questions as to how can I find the way to pass array in setString method. I tried with loop but not works. Can you guide me please

Thanks again
Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 833
any help please
Jack Anderson
Greenhorn

Joined: Dec 19, 2009
Posts: 5
Hi Farakh,

The way i understand you problem is that you want to execute this query for each of the array objects.

If that is the case, you may write a very simple code like this:


Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 833
My table structure & Query:


When am running Oracle SQL statement then its giving accurate results as I copy pasted above but when am running in servlet then it displays:

cv_id=1
cv_id=1
cv_id=21
cv_id=1
cv_id=21
cv_id=1
cv_id=21

Please note: cv_id is emp_id and this should be unique according to my SQL query but not getting the required results. Here is my code


I need output:

cv_id=1
cv_id=21

Where I am making mistake? Please help me to fix this problem

Thanks & best regards
 
jQuery in Action, 3rd edition
 
subject: Request.getParameterValues related question
 
It's not a secret anymore!