The Artima Developer Community
Sponsored Link

Java Answers Forum
PreparedStatement

2 replies on 1 page. Most recent reply: Jan 18, 2003 11:57 AM by ben

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
ben

Posts: 57
Nickname: loftty
Registered: Oct, 2002

PreparedStatement Posted: Jan 17, 2003 11:46 AM
Reply to this message Reply
Advertisement
Hello everyone
I need some help with a sql statement
I have a arrayList with 30 words inside it. I then want to get the first 10 words from that arraylist, and Insert them into a column name called FIRSTNAME. then i want to get the next 10 elements (10 to 20), and put them in a column name called LastNames. Then i want to do the same with the last 10 words from the arraylist, and put them in a column name called MiddleName. Is it possible to do this with one preparedStatement?
thanks
ben


Vimlesh

Posts: 1
Nickname: vimlesh
Registered: Jan, 2003

Re: PreparedStatement Posted: Jan 18, 2003 4:23 AM
Reply to this message Reply
U first collect your Name, Middle Name and Last Name in 3 string variables by running a for loop. Then use preparedStatement according to the JDBC syntax and in prepareStatement pass these strings as input parameters.

Best Of Luck
Vimlesh

ben

Posts: 57
Nickname: loftty
Registered: Oct, 2002

Re: PreparedStatement Posted: Jan 18, 2003 11:57 AM
Reply to this message Reply
Could you give me some code please
as i am realy stuck with it
Thanks

Flat View: This topic has 2 replies on 1 page
Topic: how to devide the stream? Previous Topic   Next Topic Topic: Stopping Threads

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use