Can you store the resultSet from a query into a vector?

I am totally frustrated. How the heck does one store the results of a query (resultSet) in a vector so that I can get the vector from my jsp page to display in a table.? searchRS is my resultSet from stmt.executeQuery().
public Vector storeResultSet ()throws SQLException
int dataType;
Vector rows = new Vector();
System.out.println("INSIDE SEARCHQUERY VALUE OF searchRS: " + searchRS);
// Get the ResultSetMetaData. This will be used for the column headings
ResultSetMetaData rsmd = searchRS.getMetaData();
// Get the number of columns in the result set
int numCols = rsmd.getColumnCount ();
columnNames = new String[numCols];
System.out.println("inside of store results and column count of rsmd is: " + numCols);
boolean more = searchRS.next();
while (more)
Vector testData = new Vector();
for(int i=0;i<numCols;i++)
Object value = searchRS.getObject(i);
rows.add(value);
System.out.println("VALUE of testData vector is: " + rows);
more = searchRS.next ();
rows.add(testData);
System.out.println("This is the populated vector in storeSearchResults " + rows);
return rows;
}>

The OP has initiated a new thread asking this question, it's here
http://forum.java.sun.com/thread.jspa?threadID=5162925
Please don't created duplicate threads! If you feel you have to create a new thread for this question, post here and explain (as I did) so that no further replies will be posted to this thread.

Similar Messages

  • How can i store the data from the list to MS-Access?

    Hi all,
    We all know that from alv it is possible to export data to Ms-excel or word or text file. Can anyone tell me how can i store the data from alv or reports to Ms-Access?
    Thanks in Advance,
    Abhijit

    Hi,
    If you want that without code, i suppose there is a option in MS-Access to import data from Excel, so you have to first export to excel and then import to Access.
    If you want to code it yourself then have a look at FM TABLE_EXPORT_TO_MSACCESS, as said in Exporting Data from R/3 to MS ACCESS
    You can also see the search results in SCN for [export data to MS-Access (45 Results)|https://www.sdn.sap.com/irj/sdn/advancedsearch?query=exportdatato+MS-Access&cat=sdn_all].
    Regards
    Karthik D

  • How can you move the objects from one server to another?

    how can you move the objects from one server to another?

    Hi,
    Collecting objects for Transporting
    1. rsa1->transport connection
    2. left panel choose 'object type', middle panel choose 'infocube' and 'select objects'
    3. then choose your infocube and 'transfer'
    4. will go to right panel, choose collection mode 'manual' and grouping only 'necessary objects'
    5. after objects collection finished, create request
    6. If they are $TMP, then change the package.
    7. When you click the Save on the change package, it will prompt for transport. Here you can provide an existing open transport request number, or if you like here itself you can create a new one.
    8. You can check the request in SE09 to confirm.
    Releasing Transport Request  
    Lets say you are transporting from BWD to BWQ
    Step 1: In BWD go to TCode SE10
    Step 2: Find the request and release it (Truck Icon or option can be found by right click on request #)
    Note: First release the child request and then the parent request
    Steps below are to import transport (generally done by basis )
    Step 1: In BWQ go to Tcode STMS
    Step 2: Click on Import queue button
    Step 3: Double Click on the line which says BWQ (or the system into which transport has to be imported)
    Step 4: Click on refresh button
    Step 5: High light the trasnport request and import it (using the truck icon)
    Transport
    http://help.sap.com/saphelp_nw2004s/helpdata/en/b5/1d733b73a8f706e10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/0b/5ee7377a98c17fe10000009b38f842/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/224381ad-0701-0010-dcb5-d74236082bff
    Hope this helps.
    thanks,
    JituK

  • How can you mute the vocal from a stereo music on garageband 10.0.2

    I need to know ASAP please

    _VanCity_ wrote:
    How can you mute the vocal from a stereo music on garageband 10.0.2
    http://www.bulletsandbones.com/GB/GBFAQ.html#removevocals
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • HT1531 Can you change the processor from PowerPC to Intel?

    Can you change the processor from PowerPC to Intel?

    Welcome to the Apple Support Communities
    It's not possible. Intel-based Macs use completely different logic boards than PowerPC-based Macs because chips are different (Intel-based Macs use EFI instead of Open Firmware, or PRAM instead of NVRAM), so if you want a Intel processor on your computer, you need a new iMac

  • How can i import the data from multiple sources into single rpd in obiee11g

    how can i import the data from multiple sources into single rpd in obiee11g

    Hi,
    to import from multiple data sources, first configure ODBC connections for respective data sources. then you can import data from multiple data sources. When you import the data, a connection pool will create automatically.
    tnx

  • Can you extract the audio from a music video?

    Some of my favorite songs were purchased from Itunes as music videos. (Because they are also my favorite videos.) Now I'm trying to figure out how to move those songs to the iPod +without having to buy the songs as just songs!+ It's been very frustrating. "Create iPod or iPhone version" doesn't convert to anything useful for a Shuffle. How do I extract the audio from the video?
    Or do I have to buy the same music over again?

    Hello RoyFeni,
    And welcome to Apple Discussions!
    Can you change the music video's *Media Type* to Music from under the Options tab of the *Get Info* window for the track in iTunes?
    I'm not sure if you can, but hey its at least worth a try. It's all I have though.
    Otherwise, this is not possible via iTunes. The only way you would be able to extract the audio is through the help of some third party application. Not sure how simple or complicated the process is.
    B-rock

  • Can you disable the camera from the lock screen? iOS8.0.2

    I have a brand new iPhone 6, updated to iOS 8.0.2 and my friends like to steal my phone and take HUNDREDS of photos and that takes up a lot of space. And my question is: can you disable the camera option on the lock screen only. I know you can do it with restrictions but I don't want to loose full camera options. Just from the lock screen. Thanks!

    I agree with the don't let them steal your phone part. But these friends aren't the friends that they sound like. Plus, this wasn't very helpful. But thank you for the "response"

  • I have 2 laptops and both have itune liberies,how can I transfer the music from old laptop into the new one.this prevents me to sync. my music due to having 2 liberies,when this happens I cant get all the music I've downloaded

    I have 2 laptops and both have liberies,how can I transfer the music from my 1st account (laptop) into the newer one which I made a new account for.My Iclassic has music fro both liberies, but once I purchase a new song and try to sync, it into my iclassic it doesn't allow me todue to having both liberies.Can u plesae help

    See Recover your iTunes library from your iPod or iOS device.
    tt2

  • Can you import the video from an AVCHD Disc into FCP7  for editing?

    Can the video from an AVCHD Disc be imported into FCP 7 for re-editing if you have a normal Superdrive burner?
    The reason I ask is because last night our film-making club gave a show of short videos to some guests.
    At the end it was decided to put them all on one DVD to send to the visitors as a memento.
    However, some of the films were on AVCHD discs and I queried whether they could be copied, even in standard definition.
    The "copier" said it was no problem as he had a PC and had done it before . . . . . cheeky devil!
    So can it be done . . . . . on a PC or a Mac . . . . with a standard burner?
    I have just tried but nothing in the BDMV folder can be imported.

    GOT IT!
    Copy the BDMV folder from the AVCHD disc to the desktop.
    Use HandBrake to convert the .m2ts files to H.264
    Then convert the H.264 files to an editable format.
    Rather convoluted process but it works.
    Anyone know a better method?

  • Can you transfer the music from your ipod to a new itunes on a new computer

    I just bought a new computer because my other one was stolen. dose any one know how to transfer the songs from my ipod to the new itunes? cuz everything is on my ipod. thank you
    Message was edited by: christophorus2890
    Message was edited by: christophorus2890

    Hi There
    You can only transfer purchased music from your iPod to iTunes using iTunes. However there are third party utilities that you can use to retrieve your music, just do a google search or have a look on http://www.versiontracker.com
    Hope this helps
    J.C
    Message was edited by: J.C

  • Can you store the {tag_pagetitle}?

    I am making a special template to use for customer feedback on products.  Have created a special catalog that will only be accessed for this purpose, and a template to go with it.  Would like to hide {tag_pagecontent} from the product (large item layout) and just display the {tag_pagetitle}.  Thought it would be easy until I found you can only use the {tag_pagetitle} in the head - <title> wrap.  Any ideas on how to grab that information to use further down in the page?  I have it displaying in my title bar, so I know it's there!

    Hi,
    You can use {module_pagename}.
    Kind Regards,
    Alex

  • Can you restore the data from an iPhone 6 if it has water damage?

    i want to know if i can get all the data that was on my iPhone 6 that has water damage.

    No way to tell until you try. If the water damage was severe enough
    to prevent the iPhone from starting up, then the answer is effectively no
    (see next paragraph).
    Companies specializing in data recovery may - emphasis on may - be
    able to recover some data. Attempts are very very expensive and there are
    no guarantees. Google/Bing/Yahoo/etc should assist in locating such companies.
    Have you failed to backup your iPhone or sync it to iCloud?

  • Can you record the audio from a Video embedded in a pdf?

    I can't seem to find anything on this, so I will ask. A client sent us a company produced interactive pdf and wants us to use the audio from a video clip that is in the pdf. We asked for the audio clip but they don't know who to get it from and just keep saying it is in the pdf. While others try to explain that a pdf and an mp3 are not the same thing. I get to look into a fall back position of trying to extract the audio (or video). There is no copyright issue here. Client peon just can't/won't get the proper file.
    Maybe some one can help or point me to info that says it is not possible.
    Thanks.

    WireTap Studio did the trick. I downloaded a free Trial version and bob's yer uncle.
    Thanks Michael

  • Can you use the value from a numeric indicator in a numeric control?

    Hi!
         I have to develop a code where I have to find the maximum value of a waveform and draw a line at 50% of the value. So I chose to find the amplitude of say 10 cycles of waveforms and found the maximum value out of the amplitudes. 
    But my real problem is, I have to use the maximum amplitude value that I get from the max. array VI and put it back in program to calculate the 50% value. 
    So is it possible to use the value from a numeric indicator and put it in a numeric control? Like in MATLAB or C, you give the variable a name and use it later to do any computations. Is it possible to do something similar in LabVIEW? 
    Solved!
    Go to Solution.

    Hi!
         Thank you very much for taking some time out. I have been trying to do this since 2 months and I am stuck right where I am.
    The situation is, I have to calculate the amplitude of the irregular waveform for a few trials and then find the maximum amplitude out of the trials and display a line at whatever % of amplitude the user chooses. I tried using property nodes but I am getting Error 1055 for some unknown reason. Then I decided to draw the line using DC offset but it turns out it calculates the amplitude each time and so the line keeps dancing everytime. Now my challenge is to have the amplitude calculated for say, 20 loops and then calculate the max from that. I ran out of ideas so I am posting here. I am using LabVIEW version 8, and I'll upload a few of my attempts. I hope I am not troubling you'll much.
    Attachments:
    amplitude display.vi ‏217 KB
    amplitude display 1.vi ‏148 KB
    Using property node.vi ‏56 KB

Maybe you are looking for