Results 1 to 4 of 4
Thread: MySQL into an Array
- 10-22-2010, 06:11 AM #1
Member
- Join Date
- Oct 2010
- Posts
- 1
- Rep Power
- 0
- 10-22-2010, 08:05 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,589
- Blog Entries
- 7
- Rep Power
- 17
If you change this comment line: '// process line of data' to an actual statement, such as:
... you have an executable piece of code and you can see what it does by running it. The instruction wants you to add functionality at the '...' line. Also read the API documentation, you'll need it (sorry, no link, I didn't have my espresso yet ;-)Java Code:System.out.println(line);
kind regards,
Jos
-
vikram,
Please don't hijack another's thread but rather ask your new question in its own thread. Hijacked post moved into own thread and old thread locked.
- 10-22-2010, 01:19 PM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
What have you done so far, and what doesn't work?
The basic structure is:
get connection
create or prepare a statement
execute the statement to get the result set
loop through the result set creating an object that represents the data returned for each row, storing that in a list.
close everything in a finally block.
Similar Threads
-
Variable of an object in an array compared to an element of another array?
By asmodean in forum New To JavaReplies: 23Last Post: 09-07-2010, 08:12 PM -
Trying to make an array list // inserting an element to middle of array
By javanew in forum New To JavaReplies: 2Last Post: 09-06-2010, 01:03 AM -
Convert Char Array to String Array
By Mayur in forum New To JavaReplies: 8Last Post: 10-12-2009, 11:41 AM -
How to add an integer to a array element and the store that backinto an array.
By Hannguoi in forum New To JavaReplies: 1Last Post: 03-31-2009, 06:40 AM -
MySQL/JDBC Mysql query output
By thelinuxguy in forum Advanced JavaReplies: 4Last Post: 02-13-2009, 01:57 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks