I need to get some information from a table and use it to populate a vector. I have examples of how to query the table but I don't have any examples on what to do with the info once I get it. Like once I get a stockname from the table how do I refer to that in the program. Am I making myself clear?
What this returns is the values in the first field of my table. So I would think that rs.getString(2) would return the values in the second field of my table. But no it throws an exception instead. So how do I go about getting the second field?
Joined: Dec 10, 2001
You could do it in the following manner. Consider a table named student with three columns - idNo, fName, and lName - that are all varchars. The following code would print to the console a listing of everybody in the table.Does that help to give you an idea?
Joined: Mar 17, 2003
That is definitely helpful. I can understand doing it that way much better than the way I was doing it. Thanks.